fix(whatsapp): resolve LID @-mentions in sidecar and trust mentions_bot in gateway

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-06-04 20:01:45 +08:00
parent dcb779a691
commit 8c665290c4
4 changed files with 99 additions and 7 deletions

View file

@ -82,6 +82,20 @@ def test_should_accept_group_mention_with_lid_phone_match() -> None:
)
def test_should_accept_group_when_sidecar_reports_mentions_bot() -> None:
assert (
should_process_group_inbound(
is_group=True,
text="hi",
mentions=["unknown-lid@lid"],
bot_jid="999@s.whatsapp.net",
require_mention=True,
metadata={"mentions_bot": True, "raw": {"mentionsBot": True}},
)
is True
)
def test_should_accept_group_reply_to_bot() -> None:
assert (
should_process_group_inbound(