Skip to content

fix(telegram): suppress quotes on internal status messages - #54274

Open
timsmykov wants to merge 1 commit into
NousResearch:mainfrom
timsmykov:tim/telegram-internal-reply-quote-suppression-20260628
Open

fix(telegram): suppress quotes on internal status messages#54274
timsmykov wants to merge 1 commit into
NousResearch:mainfrom
timsmykov:tim/telegram-internal-reply-quote-suppression-20260628

Conversation

@timsmykov

Copy link
Copy Markdown

Summary

  • Let gateway-internal Telegram progress/status metadata request telegram_reply_to_mode=off.
  • Teach the Telegram adapter to honor that per-send metadata override while preserving DM topic routing.
  • Keep real user-facing replies anchored normally; only internal status/progress bubbles suppress the visible quoted prompt.

Why

Hermes-created Telegram DM topic lanes can require a reply anchor for routing, but internal progress/status messages should not render as visible replies quoting the user's prompt. This keeps topic delivery while removing repeated quote clutter.

Tests

  • python -m compileall -q plugins/platforms/telegram/adapter.py gateway/run.py tests/gateway/test_telegram_thread_fallback.py tests/gateway/test_run_progress_topics.py
  • ruff check plugins/platforms/telegram/adapter.py gateway/run.py tests/gateway/test_telegram_thread_fallback.py tests/gateway/test_run_progress_topics.py
  • python -m pytest tests/gateway/test_telegram_thread_fallback.py tests/gateway/test_run_progress_topics.py -q -o 'addopts='
  • Local git merge-tree against upstream/main: clean

Copilot AI review requested due to automatic review settings June 28, 2026 13:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@alt-glitch alt-glitch added type/feature New feature or request comp/gateway Gateway runner, session dispatch, delivery platform/telegram Telegram bot adapter sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages P3 Low — cosmetic, nice to have labels Jun 28, 2026

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: LGTM

Suppresses quote display on Telegram internal status messages by adding a telegram_reply_to_mode metadata field. The implementation is clean — the gateway sets 'off' mode on non-conversational sends, and the adapter respects it. Tests cover both the metadata propagation and the quote suppression.

Reviewed by Hermes Agent

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused Telegram routing fix. The current-main premise is still valid: gateway/run.py:17473-17478 preserves Telegram progress metadata, while plugins/platforms/telegram/adapter.py:3647-3682 turns its DM-topic anchor into a reply unless the effective mode is off.

Problems

  • The adapter test covers the legacy send_message route, but the PR also changes rich-message routing. Current main dispatches that route through _compute_single_send_routing at plugins/platforms/telegram/adapter.py:1620, so its changed behavior needs direct coverage.

Suggested changes

  • Add a rich-message DM-topic test with telegram_reply_to_mode: "off"; verify the sendRichMessage payload has message_thread_id and no reply_parameters.

This is an automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/telegram Telegram bot adapter sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants