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)