From 8fc5b83ed4c7f8b1dc039e1e771315b8cee08079 Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Thu, 19 Mar 2026 15:06:38 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Synology=20Chat=20API=20=ED=95=84?= =?UTF-8?q?=EB=93=9C=EB=AA=85=20msg=20=E2=86=92=20message=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Synology Chat Post API의 텍스트 필드가 msg가 아닌 message임을 확인. Co-Authored-By: Claude Opus 4.6 (1M context) --- chat_bridge.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chat_bridge.py b/chat_bridge.py index d80d456..87e4fb9 100644 --- a/chat_bridge.py +++ b/chat_bridge.py @@ -147,9 +147,9 @@ async def poll_channel(client: httpx.AsyncClient): async def forward_to_n8n(post: dict): payload = { - "text": post.get("msg", ""), + "text": post.get("message", ""), "user_id": post.get("creator_id", 0), - "username": post.get("display_name", post.get("username", "unknown")), + "username": str(post.get("creator_id", "unknown")), "post_id": post.get("post_id", 0), "timestamp": post.get("create_at", 0), } @@ -176,7 +176,7 @@ async def poll_retrospect_channel(client: httpx.AsyncClient): if post_id <= retro_last_seen_post_id: continue # 텍스트 메시지만 포워딩 (파일/시스템 메시지 제외) - if post.get("type", "normal") == "normal" and post.get("msg", "").strip(): + if post.get("type", "normal") == "normal" and post.get("message", "").strip(): await forward_to_n8n(post) if posts: max_id = max(p.get("post_id", 0) for p in posts)