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

@ -12,6 +12,7 @@ from runtime.orchestration.group_ingest import (
resolve_group_policy,
session_user_key,
should_process_group_inbound,
text_mentions_bot,
)
from interfaces.channels.base import InboundMessage
from runtime.application.gateway.inbound_service import _parse_generic_inbound, process_inbound_payload
@ -95,6 +96,11 @@ def test_should_accept_group_reply_to_bot() -> None:
)
def test_text_mentions_bot_phone_fallback() -> None:
assert text_mentions_bot(text="@1234567890 hello", bot_jid="1234567890@s.whatsapp.net") is True
assert text_mentions_bot(text="hello", bot_jid="1234567890@s.whatsapp.net") is False
def test_should_accept_group_trigger_without_mention() -> None:
assert (
should_process_group_inbound(