feat ReplyType.IMAGE 回复图片为空的BUG

This commit is contained in:
Clivia
2024-03-27 14:49:54 +08:00
committed by GitHub
parent b8cc62ae95
commit 8309f7cdbe

View File

@@ -233,6 +233,7 @@ class WechatChannel(ChatChannel):
logger.info("[WX] sendImage url={}, receiver={}".format(img_url, receiver))
elif reply.type == ReplyType.IMAGE: # 从文件读取图片
image_storage = reply.content
image_storage.seek(0)
itchat.send_image(image_storage, toUserName=receiver)
logger.info("[WX] sendImage, receiver={}".format(receiver))
elif reply.type == ReplyType.FILE: # 新增文件回复类型