bugfix
This commit is contained in:
parent
9ebf60699d
commit
c328e91f30
@ -4,7 +4,7 @@ from aiohttp import web, ClientSession, FormData, ClientTimeout
|
||||
from wechatpy.crypto import WeChatCrypto
|
||||
from wechatpy.exceptions import InvalidSignatureException, WeChatClientException
|
||||
from wechatpy.messages import (
|
||||
Message, TextMessage, ImageMessage, VoiceMessage, VideoMessage,
|
||||
BaseMessage, TextMessage, ImageMessage, VoiceMessage, VideoMessage,
|
||||
LocationMessage, LinkMessage, EventMessage
|
||||
)
|
||||
from wechatpy.replies import (
|
||||
@ -72,7 +72,7 @@ class WOAHandler:
|
||||
url = f"https://api.weixin.qq.com/cgi-bin/media/get?access_token={access_token}&media_id={media_id}"
|
||||
return url
|
||||
|
||||
async def messagehandler(self, request:web.Request, msg:Message):
|
||||
async def messagehandler(self, request:web.Request, msg:BaseMessage):
|
||||
"""
|
||||
TextMessage, ImageMessage, VoiceMessage, VideoMessage,
|
||||
LocationMessage, LinkMessage, EventMessage
|
||||
@ -121,7 +121,7 @@ class WOAHandler:
|
||||
reply = ImageReply(message=msg, media_id=media_id)
|
||||
return reply
|
||||
if rzt_msg.msgtype == 'voice':
|
||||
reply = VoiceMessage(message=msg, media_id=media_id)
|
||||
reply = VoiceReply(message=msg, media_id=media_id)
|
||||
return reply
|
||||
if rzt_msg.msgtype == 'video':
|
||||
reply = VideoReply(message=msg, title=rzt_msg.title,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user