fix(gateway): normalize false reply mode at config boundary#29640
Closed
wesleysimplicio wants to merge 1 commit into
Closed
fix(gateway): normalize false reply mode at config boundary#29640wesleysimplicio wants to merge 1 commit into
wesleysimplicio wants to merge 1 commit into
Conversation
Collaborator
Contributor
Author
|
Thanks for pointing this out. I updated the PR body to make the overlap explicit: this is the narrow config-boundary patch, while #29639 is the broader/superset fix for the same #29623 issue. If maintainers prefer the broader adapter-defensive approach in #29639, this PR should be closed in favor of that one rather than treated as a competing duplicate. |
Contributor
Author
|
Fechando este PR como duplicado — @alt-glitch confirmou que #29639 (por @xxxigm) é um superset que também normaliza nos adapters Discord e Telegram, além da borda de config que este PR cobria. Obrigado pela revisão! cc #29639 |
This was referenced May 25, 2026
This was referenced May 25, 2026
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?
Normalizes legacy
reply_to_mode: falsegateway config values to the explicit reply modeoffbefore Discord adapter initialization.Root cause
PlatformConfig.from_dict()preserved booleanFalseforreply_to_mode.DiscordAdapterthen treated that falsy value as missing and fell back tofirst, which made Discord replies reference the triggering message again.Fix
Falseand string"false"to"off"for backward compatibility."first"default for missing or unsupported values.PlatformConfig.from_dict()passesoffthrough to the adapter.Why this shape
This is the narrow config-boundary patch: it normalizes the legacy value where
PlatformConfig.from_dict()accepts external configuration and keeps the Discord adapter receiving an explicit string mode.PR #29639 is the broader/superset fix for the same issue because it also adds defensive normalization in Discord and Telegram adapters. If maintainers prefer that broader shape, this PR should be closed in favor of #29639 rather than merged as a competing duplicate.
Tests
git diff --check -- gateway/config.py tests/gateway/test_discord_reply_mode.pypython -m py_compile gateway\config.pypython -m pytest tests/gateway/test_discord_reply_mode.py tests/gateway/test_config.py -q -o addopts= -p no:xdist— 82 passed.python -m ruff check gateway\config.py tests\gateway\test_discord_reply_mode.pyRelated PRs / issues
reply_to_mode: falseregresses tofirston current runtime #29623.