fix(gateway): apply home channel env overrides consistently#3808
Merged
fix(gateway): apply home channel env overrides consistently#3808
Conversation
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>
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
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-envifblocks ingateway/config.py. If a platform was already configured viaconfig.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.platformsguard). This applies the same pattern to the remaining 6 platforms.Test
Added
TestHomeChannelEnvOverridescovering 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.