fix: Synology Chat API 필드명 msg → message 수정

Synology Chat Post API의 텍스트 필드가 msg가 아닌 message임을 확인.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-19 15:06:38 +09:00
parent 323de7afbe
commit 8fc5b83ed4

View File

@@ -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)