From ab3384d6a5a407bd933e5f3ae193bdc876130f14 Mon Sep 17 00:00:00 2001 From: v6ole Date: Fri, 26 Jun 2026 15:24:33 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BC=81=E5=BE=AE=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E6=94=B6=E5=B0=BE=20=E2=80=94=20=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=E6=97=A5=E5=BF=97=20+=20=E8=B0=83=E8=AF=95=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- backend/app/api/wecom.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/app/api/wecom.py b/backend/app/api/wecom.py index 647e97f..d7ee472 100644 --- a/backend/app/api/wecom.py +++ b/backend/app/api/wecom.py @@ -109,11 +109,17 @@ async def wecom_callback_event(request: Request): event = (msg.findtext("Event", "") or "").strip() event_key = (msg.findtext("EventKey", "") or "").strip() + import logging + _log = logging.getLogger("wecom_callback") + _log.warning(f"wecom msg: type={msg_type} from={from_user} content={repr(content)} event={event} key={event_key}") + # Triggers for binding if (msg_type == "text" and content == "绑定") or (msg_type == "event" and event == "click" and event_key == "BIND_ACCOUNT"): + _log.warning(f"wecom bind triggered for {from_user}") _handle_bind_request(from_user) return PlainTextResponse(content="success") + _log.warning(f"wecom msg ignored (no match)") return PlainTextResponse(content="success")