From 6bd286e8d51f68fefdcaa6ed62193c22531fba16 Mon Sep 17 00:00:00 2001 From: befantasy <31535803+befantasy@users.noreply.github.com> Date: Fri, 15 Sep 2023 16:22:46 +0800 Subject: [PATCH] Update wechat_channel.py to support ReplyType.FILE --- channel/wechat/wechat_channel.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/channel/wechat/wechat_channel.py b/channel/wechat/wechat_channel.py index 4d01d92..061440a 100644 --- a/channel/wechat/wechat_channel.py +++ b/channel/wechat/wechat_channel.py @@ -208,3 +208,7 @@ class WechatChannel(ChatChannel): image_storage.seek(0) itchat.send_image(image_storage, toUserName=receiver) logger.info("[WX] sendImage, receiver={}".format(receiver)) + elif reply.type == ReplyType.FILE: # 新增文件回复类型 + file_storage = reply.content + itchat.send_file(file_storage, toUserName=receiver) + logger.info("[WX] sendFile, receiver={}".format(receiver))