fix(gateway): load reply_to_mode from config.yaml for Discord and Telegram#17117
Closed
ashermorse wants to merge 1 commit into
Closed
fix(gateway): load reply_to_mode from config.yaml for Discord and Telegram#17117ashermorse wants to merge 1 commit into
ashermorse wants to merge 1 commit into
Conversation
…egram The YAML-to-env-var bridge in load_gateway_config() mapped every Discord and Telegram config key (require_mention, auto_thread, reactions, etc.) except reply_to_mode. Users setting discord.reply_to_mode or telegram.reply_to_mode in ~/.hermes/config.yaml got no effect — the adapter only read the env var, which nothing populated from YAML. Add the missing bridge for both platforms, following the existing pattern. Top-level <platform>.reply_to_mode preferred, falls back to <platform>.extra.reply_to_mode, env var never overwritten. Handles YAML 1.1 bare `off` → Python False coercion. This is a re-submission of the work from #9837 and #13930, which both implemented the same fix but neither landed (see co-authors below). Co-authored-by: Matteo De Agazio <hypnosis.mda@gmail.com> Co-authored-by: ishardo <239075732+ishardo@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.
What does this PR do?
discord.reply_to_modeandtelegram.reply_to_modeinconfig.yamlare silently ignored — the YAML-to-env-var bridge maps every sibling key but this one was missed.Re-submission of the fix from #9837 (@Hypn0sis, Discord-only, went stale) and #13930 (@ishardo, Discord + Telegram, auto-closed when author deleted their fork). Both are credited as co-authors. The code is theirs; this PR just re-applies it since neither landed.
Changes Made
gateway/config.py: addreply_to_modeYAML-to-env-var bridge in both Discord and Telegram config blockstests/gateway/test_discord_reply_mode.py: 5 new tests (TestYamlConfigLoading)tests/gateway/test_telegram_reply_mode.py: 5 new tests (TestTelegramYamlConfigLoading)How to Test
pytest tests/gateway/test_discord_reply_mode.py tests/gateway/test_telegram_reply_mode.py -v— 63 pass (53 existing + 10 new).Tested on macOS 15 (Darwin 25.2.0).