feat(whatsapp): authorize @mentions in groups regardless of allowlist - #3636
Closed
ajayr wants to merge 1 commit into
Closed
feat(whatsapp): authorize @mentions in groups regardless of allowlist#3636ajayr wants to merge 1 commit into
ajayr wants to merge 1 commit into
Conversation
- Add bot_mentioned flag to MessageEvent for cross-platform use - Bridge detects @mentions using participant list in group messages - Gateway authorizes @mentions from any user in group chats - Respects per-group memory rules (e.g., only respond when @mentioned) This enables group members to trigger the bot without being on the individual allowlist, while still respecting group-specific behavior constraints stored in memory.
This was referenced Apr 3, 2026
Contributor
|
Superseded by PR #4730 which implements the full require_mention/mention_patterns/free_response_chats config system for WhatsApp (mirroring Telegram's pattern). Your earlier work on @mention authorization for groups was appreciated — the merged solution covers that use case and more. Credit to @kshitijk4poor for the implementation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enables WhatsApp group members to trigger the bot via @mentions without being on the individual user allowlist.
Changes
base.py): Addedbot_mentioned: boolflag for cross-platform usebridge.js): Detects @mentions using the participant list in group messages, passesbotMentioned: truewhen detectedwhatsapp.py): Extracts and forwards thebotMentionedflag from bridge eventsrun.py): Authorizes @mentions from any user in group chats, bypassing the allowlist checkWhy
Previously, only users on the allowlist could trigger the bot, even in group chats. This blocked legitimate use cases where:
Behavior
Testing
Tested in a WhatsApp group with a user not on the allowlist successfully triggering the bot via @mention.
Bot responded correctly to the @mention.