Skip to content

feat(config): add REPLY_QUOTE to control message quoting#111

Merged
RichardAtCT merged 3 commits intoRichardAtCT:mainfrom
F1orian:feat/configurable-reply-quoting
Feb 26, 2026
Merged

feat(config): add REPLY_QUOTE to control message quoting#111
RichardAtCT merged 3 commits intoRichardAtCT:mainfrom
F1orian:feat/configurable-reply-quoting

Conversation

@F1orian
Copy link
Copy Markdown
Contributor

@F1orian F1orian commented Feb 25, 2026

Summary

  • Adds REPLY_QUOTE env var (default: true) to control whether bot responses quote the original user message
  • When false, responses are sent without the reply-quote bubble, giving cleaner thread-based conversations
  • Applied consistently across agentic mode (orchestrator) and classic mode (message handler), including all fallback paths

Usage

# Disable reply quoting for cleaner threads
REPLY_QUOTE=false

Test plan

  • Default behaviour unchanged (REPLY_QUOTE unset or true → responses quote the user message)
  • Setting REPLY_QUOTE=false → responses sent without quoting
  • Fallback error messages also respect the setting
  • Works in both agentic and classic mode

🤖 Generated with Claude Code

F1orian and others added 3 commits February 25, 2026 23:35
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>
@RichardAtCT RichardAtCT merged commit 87f6aa4 into RichardAtCT:main Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants