fix(whatsapp): sync sidecar on start and forward all group inbounds

Copy bridge files when starting WhatsApp sidecar, enforce group policy only in gateway with richer @ detection, and log skipped group messages for debugging.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-06-04 19:52:25 +08:00
parent 9657b313a3
commit dcb779a691
5 changed files with 73 additions and 48 deletions

View file

@ -709,6 +709,16 @@ def process_inbound_payload(payload: dict[str, Any]) -> dict[str, Any]:
triggers=list(group_policy.triggers),
metadata=inbound.metadata if isinstance(inbound.metadata, dict) else {},
):
import logging
logging.getLogger(__name__).info(
"whatsapp group inbound skipped chat=%s user=%s mentions=%s require_mention=%s text=%r",
inbound.external_chat_id,
inbound.external_user_id,
list(inbound.mentions or []),
group_policy.require_mention,
text[:120],
)
return {"ok": True, "replies": []}
reply = ""
reply_attachments: list[dict[str, Any]] = []