feat(bluebubbles): support group mention gating - #37091
Merged
Merged
Conversation
Collapse the three mention-parsing helpers into one _compile_mention_patterns that handles list/string/None inputs, and inline the require_mention bool coercion to match the signal/dingtalk convention. Same behavior, 16 fewer lines, no per-instance state in the staticmethod.
1 task
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
BlueBubbles/iMessage group chats can now opt into mention gating — Hermes only responds when addressed by a wake word, matching the 8 other platforms that already support
require_mention.Salvage of #35606 by @tmchow (Trevin Chow), cherry-picked onto current
mainwith authorship preserved, plus a follow-up refactor that trims the helper boilerplate.Changes
gateway/platforms/bluebubbles.py: addrequire_mention+mention_patterns(config.yaml + env), conservative defaulthermes/hermes agentwake words, strip the leading wake word before dispatch. Group-only; DMs and default behavior unchanged.gateway/config.py:BLUEBUBBLES_REQUIRE_MENTION/BLUEBUBBLES_MENTION_PATTERNSenv overrides.scripts/release.py: AUTHOR_MAP entry for the contributor.website/docs/.../bluebubbles.md: config/env docs._compile_mention_patterns, inlined the bool coercion to match the signal/dingtalk convention. Same behavior, 16 fewer lines on the adapter.Validation
tests/gateway/test_bluebubbles.pyruff check gateway/platforms/bluebubbles.pyReplaces #35606.
Infographic