debug: webhook 수신 chat.id 로깅 + Telegram HTML escape 수정

This commit is contained in:
2026-04-13 02:24:42 +09:00
parent de80ebd707
commit 1d535519ef

View File

@@ -20,6 +20,9 @@ async def handle_webhook(data: dict, agent_dispatcher=None) -> Optional[dict]:
return await _handle_callback(callback_query) return await _handle_callback(callback_query)
message = data.get("message") message = data.get("message")
if message:
chat = message.get("chat", {})
print(f"[TG-WEBHOOK] chat.id={chat.get('id')} type={chat.get('type')} text={message.get('text')!r}", flush=True)
if message and message.get("text") and agent_dispatcher is not None: if message and message.get("text") and agent_dispatcher is not None:
return await _handle_message(message, agent_dispatcher) return await _handle_message(message, agent_dispatcher)