mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
修复两处BUG
1、类型定义中使用了驼峰,但其他位置使用的大写 2、微信channel中,发送IMAGE,多余了seek方法
This commit is contained in:
@@ -11,7 +11,7 @@ class ReplyType(Enum):
|
|||||||
VIDEO_URL = 5 # 视频URL
|
VIDEO_URL = 5 # 视频URL
|
||||||
FILE = 6 # 文件
|
FILE = 6 # 文件
|
||||||
CARD = 7 # 微信名片,仅支持ntchat
|
CARD = 7 # 微信名片,仅支持ntchat
|
||||||
InviteRoom = 8 # 邀请好友进群
|
INVITE_ROOM = 8 # 邀请好友进群
|
||||||
INFO = 9
|
INFO = 9
|
||||||
ERROR = 10
|
ERROR = 10
|
||||||
TEXT_ = 11 # 强制文本
|
TEXT_ = 11 # 强制文本
|
||||||
|
|||||||
@@ -233,7 +233,6 @@ class WechatChannel(ChatChannel):
|
|||||||
logger.info("[WX] sendImage url={}, receiver={}".format(img_url, receiver))
|
logger.info("[WX] sendImage url={}, receiver={}".format(img_url, receiver))
|
||||||
elif reply.type == ReplyType.IMAGE: # 从文件读取图片
|
elif reply.type == ReplyType.IMAGE: # 从文件读取图片
|
||||||
image_storage = reply.content
|
image_storage = reply.content
|
||||||
image_storage.seek(0)
|
|
||||||
itchat.send_image(image_storage, toUserName=receiver)
|
itchat.send_image(image_storage, toUserName=receiver)
|
||||||
logger.info("[WX] sendImage, receiver={}".format(receiver))
|
logger.info("[WX] sendImage, receiver={}".format(receiver))
|
||||||
elif reply.type == ReplyType.FILE: # 新增文件回复类型
|
elif reply.type == ReplyType.FILE: # 新增文件回复类型
|
||||||
|
|||||||
Reference in New Issue
Block a user