Pārlūkot izejas kodu

Update wechat_channel.py to support ReplyType.FILE

master
befantasy GitHub pirms 1 gada
vecāks
revīzija
6bd286e8d5
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: 4AEE18F83AFDEB23
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. +4
    -0
      channel/wechat/wechat_channel.py

+ 4
- 0
channel/wechat/wechat_channel.py Parādīt failu

@@ -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))

Notiek ielāde…
Atcelt
Saglabāt