feat(config): add REPLY_QUOTE to control message quoting#111
Merged
RichardAtCT merged 3 commits intoRichardAtCT:mainfrom Feb 26, 2026
Merged
feat(config): add REPLY_QUOTE to control message quoting#111RichardAtCT merged 3 commits intoRichardAtCT:mainfrom
RichardAtCT merged 3 commits intoRichardAtCT:mainfrom
Conversation
Add configurable reply quoting via REPLY_QUOTE env var (default: true). When set to false, bot responses are sent without quoting the original user message, giving cleaner thread-based conversations. Applied consistently across agentic mode (orchestrator) and classic mode (message handler) including all fallback paths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Setting reply_to_message_id=None alone is insufficient in PTB forum topics — the do_quote parameter must also be set to False to prevent automatic quoting. This adds do_quote=settings.reply_quote to all reply_text calls in both orchestrator.py and message.py handlers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of adding do_quote= and conditional reply_to_message_id to every reply_text call site, use PTB's Defaults(do_quote=settings.reply_quote) on the Application builder. This controls quoting behavior globally with a single line of configuration. Replaces the previous per-call approach with a cleaner, less error-prone pattern that requires no changes to handler code. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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
REPLY_QUOTEenv var (default:true) to control whether bot responses quote the original user messagefalse, responses are sent without the reply-quote bubble, giving cleaner thread-based conversationsUsage
Test plan
REPLY_QUOTEunset ortrue→ responses quote the user message)REPLY_QUOTE=false→ responses sent without quoting🤖 Generated with Claude Code