fix: allow home channel from config.yaml to be recognized - #12391
Open
h6y3-aegis wants to merge 1 commit into
Open
fix: allow home channel from config.yaml to be recognized#12391h6y3-aegis wants to merge 1 commit into
h6y3-aegis wants to merge 1 commit into
Conversation
The _handle_home_channel_check() in run.py only looked at environment variables via os.getenv(), missing home channels set via /sethome in config.yaml (which stores them as top-level keys like SLACK_HOME_CHANNEL). Changes: - Updated _handle_home_channel_check to also check config.platforms[platform].home_channel - Added _apply_config_home_channels() in config.py to load home channels from config.yaml on startup - Added support for legacy gateway.home_channel key as fallback - Updated /sethome command to also update in-memory config immediately Fixes repeated 'home not set' notifications when /sethome was used.
This was referenced Apr 25, 2026
Contributor
|
Thanks for isolating the repeated onboarding notice. The underlying same-process issue is still present on current main, but this branch targets pre-refactor code and includes config loading that no longer matches Problems
Suggested changes
Automated hermes-sweeper review. |
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
The _handle_home_channel_check() in run.py only looked at environment variables via os.getenv(), missing home channels set via /sethome in config.yaml.
Problem
When users ran
/sethometo set their home channel, the value was saved to config.yaml as a top-level key (e.g.,SLACK_HOME_CHANNEL). However, on subsequent runs, the_handle_home_channel_checkfunction only checkedos.getenv(), which doesn't see values from the loaded config. This caused users to receive repeated "home not set" notifications despite having configured it.Changes Made
_handle_home_channel_checkto also checkconfig.platforms[platform].home_channel_apply_config_home_channels()to load home channels from config.yaml's top-level keys on startupgateway.home_channelas fallback/sethomecommand handler to update in-memory config immediately (no restart required)Testing
/sethomechanges take effect immediatelyFixes the issue where users saw repeated 'home not set' notifications after using /sethome