Skip to content

fix(gateway): apply home channel env overrides consistently#3808

Merged
teknium1 merged 1 commit intomainfrom
hermes/hermes-bf2cd279
Mar 29, 2026
Merged

fix(gateway): apply home channel env overrides consistently#3808
teknium1 merged 1 commit intomainfrom
hermes/hermes-bf2cd279

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

Summary

Salvage of PR #1847 by @cutepawss.

Home channel env vars (SLACK_HOME_CHANNEL, SIGNAL_HOME_CHANNEL, MATTERMOST_HOME_CHANNEL, MATRIX_HOME_ROOM, EMAIL_HOME_ADDRESS, SMS_HOME_CHANNEL) were nested inside the credential-env if blocks in gateway/config.py. If a platform was already configured via config.yaml, setting only the home channel env var had no effect — the code never reached it.

Telegram and Discord already had the correct pattern (home channel handling outside the credential block with a Platform.X in config.platforms guard). This applies the same pattern to the remaining 6 platforms.

Test

Added TestHomeChannelEnvOverrides covering all 6 platforms — verifies that pre-existing platform configs accept home channel env overrides.

15/15 gateway config tests pass.

Closes #1847. Credit to @cutepawss for finding the bug and the fix.

Home channel env vars (SLACK_HOME_CHANNEL, SIGNAL_HOME_CHANNEL, etc.)
for Slack, Signal, Mattermost, Matrix, Email, and SMS were nested
inside the credential-env blocks, so they were ignored when the
platform was already configured via config.yaml.

Moved the home channel handling outside the credential blocks with a
Platform.X in config.platforms guard, matching the existing pattern
for Telegram and Discord.

Co-authored-by: cutepawss <cutepawss@users.noreply.github.com>
@teknium1 teknium1 merged commit 38d694f into main Mar 29, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants