mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-11 08:10:48 +08:00
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:
parent
dcb779a691
commit
8c665290c4
4 changed files with 99 additions and 7 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue