From e132f9dddcaec3a038a4e1500b25f75acee81095 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 2 Mar 2026 13:42:39 +0800 Subject: [PATCH] bugfix --- woa/init.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/woa/init.py b/woa/init.py index 31f6a5a..2b604f0 100644 --- a/woa/init.py +++ b/woa/init.py @@ -184,13 +184,14 @@ class WOAHandler: return web.Response(text="failed", status=403) # 2. 读取并解密消息体 + body='' try: body = await request.read() # decrypt_message 会自动处理解密和 XML 解析,返回 wechatpy 的消息对象 # 如果未开启加密,它也会正常解析 XML msg = self.crypto.decrypt_message(body) except Exception as e: - logger.error(f"消息解密或解析失败: {e}") + error(f"消息解密或解析失败: {e}, {body=}") return web.Response(text="success") # 防止微信重试 debug(f"收到消息类型: {type(msg).__name__}")