Skip to content

feat(slack): add allowed_channels whitelist config - #7401

Closed
CashWilliams wants to merge 1 commit into
NousResearch:mainfrom
CashWilliams:feat/slack-allowed-channel
Closed

feat(slack): add allowed_channels whitelist config#7401
CashWilliams wants to merge 1 commit into
NousResearch:mainfrom
CashWilliams:feat/slack-allowed-channel

Conversation

@CashWilliams

Copy link
Copy Markdown

What does this PR do?

Just like #7044 but for Slack.

Add SLACK_ALLOWED_CHANNELS (env var) / slack.allowed_channels (config.yaml) support to restrict the Slack bot to only respond in specified channels.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

modified:   gateway/config.py
modified:   gateway/platforms/slack.py
modified:   hermes_cli/config.py
modified:   tests/gateway/test_slack_mention.py

How to Test

  1. Add agent to Slack
  2. Ensure agent can respond in any channel
  3. Add a channel ID to SLACK_ALLOWED_CHANNELS
  4. Ensure agent can no longer respond other channels

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform:

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery platform/slack Slack app adapter area/config Config system, migrations, profiles labels Apr 29, 2026
@teknium1

teknium1 commented May 7, 2026

Copy link
Copy Markdown
Contributor

Merged via #21251 — your implementation was cherry-picked onto current main with authorship preserved in git log, and the same whitelist pattern was extended to Telegram, Mattermost, Matrix, and DingTalk on top. Thanks for the contribution!

#21251

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 platform/slack Slack app adapter type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants