Skip to content

fix(gateway): read require_mention from config.extra for Slack adapter#6303

Closed
duan78 wants to merge 1 commit into
NousResearch:mainfrom
duan78:fix/slack-require-mention-config
Closed

fix(gateway): read require_mention from config.extra for Slack adapter#6303
duan78 wants to merge 1 commit into
NousResearch:mainfrom
duan78:fix/slack-require-mention-config

Conversation

@duan78

@duan78 duan78 commented Apr 8, 2026

Copy link
Copy Markdown

Summary

The Slack adapter hardcoded mention-gating behavior, ignoring the require_mention config key that all other platforms (Telegram, Discord, WhatsApp, Matrix) already support via the gateway config bridge in gateway/config.py (lines 529+).

Users who set slack.require_mention: false in their gateway config expected the bot to respond to all channel messages, but it was silently ignored because slack.py never read the bridged value from config.extra.

Changes

  • gateway/platforms/slack.py: Added self.config.extra.get("require_mention", True) check before the mention-gating block. Default is True to preserve existing behavior for users who don't set the key.

This follows the exact same pattern used by other platform adapters.

Testing

  • All 69 existing tests in tests/gateway/test_slack.py pass.
  • No behavioral change for existing users (default remains require_mention: true).

Fixes #6218

The Slack adapter hardcoded mention-gating behavior, ignoring the
require_mention config key that other platforms (Telegram, Discord,
WhatsApp) already support via the gateway config bridge.

Users who set slack.require_mention: false in their gateway config
expected the bot to respond to all channel messages, but it was
silently ignored because slack.py never read the bridged value
from config.extra.

Add self.config.extra.get('require_mention', True) check before
the mention-gating block. Default is True to preserve existing
behavior for users who don't set the key.

Follows the same pattern as other platform adapters.

Fixes NousResearch#6218
@teknium1

teknium1 commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Merged via PR #6809 as part of a consolidated Slack adapter improvement. Your contribution was superseded by #5885's more complete implementation. Your authorship is preserved in git history. Thank you @duan78 for your work on this!

@teknium1 teknium1 closed this Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slack adapter ignores require_mention: false config for channel messages

2 participants