Tighten WhatsApp group gates: stay silent without @ and ignore quote-only replies.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-11 11:28:26 +08:00
parent 76f62d8fac
commit 8419df2187
5 changed files with 40 additions and 191 deletions

View file

@ -406,9 +406,10 @@ def should_process_group_inbound(
return True
return has_trigger
# Quote/reply-to-bot alone is not enough — require explicit @ or a trigger.
if metadata_mentions_bot(metadata):
return True
if is_reply_to_bot(metadata=metadata, bot_jid=bot_jid):
if bot_mentioned:
return True
if has_trigger:
return True