Skip to content

feat(bluebubbles): support group mention gating - #35606

Closed
tmchow wants to merge 2 commits into
NousResearch:mainfrom
tmchow:feat/bluebubbles-require-mention
Closed

feat(bluebubbles): support group mention gating#35606
tmchow wants to merge 2 commits into
NousResearch:mainfrom
tmchow:feat/bluebubbles-require-mention

Conversation

@tmchow

@tmchow tmchow commented May 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds optional require_mention support for BlueBubbles/iMessage group chats.
  • Uses conservative default Hermes wake-word regexes when no custom mention_patterns are configured.
  • Leaves DMs and the default BlueBubbles behavior unchanged unless users opt in.
  • Documents config/env options and adds focused adapter/config tests.

Rationale

Other messaging adapters already support the concept of only responding in group contexts when the bot is mentioned. BlueBubbles did not have an equivalent gate, which makes iMessage group chats noisy for users who only want Hermes to respond when addressed.

BlueBubbles does not expose a stable native bot identity comparable to Slack/Telegram/Matrix mentions, so this keeps the implementation local to the adapter and uses opt-in regex wake words rather than changing gateway-wide dispatch semantics.

Test Plan

  • python -m pytest tests/gateway/test_bluebubbles.py -q -o 'addopts=' --tb=short
  • env -u BLUEBUBBLES_HOME_CHANNEL -u BLUEBUBBLES_SERVER_URL -u BLUEBUBBLES_PASSWORD python -m pytest tests/cron/test_scheduler.py -q -o 'addopts=' --tb=short
  • ruff check gateway/platforms/bluebubbles.py gateway/config.py tests/gateway/test_bluebubbles.py
  • git diff --check

Note: running tests/cron/test_scheduler.py without unsetting local BlueBubbles env picks up this machine's configured BlueBubbles home channel and fails an isolation-sensitive assertion unrelated to this change. With the BlueBubbles env unset, it passes.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery area/config Config system, migrations, profiles labels May 31, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related: Complements #33541 / #33489 (BlueBubbles group chat filtering via ALLOWED_CHATS / IGNORE_GROUP_CHATS). This PR adds mention-based gating; #33541 adds chat-level filtering. Not a duplicate — both could coexist.

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved

Review

Adds optional require_mention support for BlueBubbles/iMessage group chats. Uses conservative default Hermes wake-word regexes, leaving DMs and default behavior unchanged.

✅ Looks Good

  • Opt-in only: Default behavior unchanged. Users opt in by configuring mention_patterns.
  • Clean implementation: Local to the adapter, uses regex wake words rather than changing gateway-wide dispatch semantics.
  • Good test coverage: 132 lines of new tests covering adapter and config behavior.
  • Documentation updated: New config/env options documented in the BlueBubbles user guide.

Reviewed by Hermes Agent (cron job)

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved ✅ — Add group mention gating support for BlueBubbles. Clean feature addition.


Reviewed by Hermes Agent

@teknium1

teknium1 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Merged via #37091. Your commits were cherry-picked onto current main with your authorship preserved in git log, plus a small follow-up refactor collapsing the three mention-parsing helpers into one (16 fewer lines, same behavior). Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants