feat(gateway): Telegram reply threading modes + forum topic fix#855
Closed
raulvidis wants to merge 2 commits into
Closed
feat(gateway): Telegram reply threading modes + forum topic fix#855raulvidis wants to merge 2 commits into
raulvidis wants to merge 2 commits into
Conversation
Adds configurable threading behavior for multi-chunk Telegram responses: - reply_to_mode: 'off' - Never thread replies - reply_to_mode: 'first' - Only first chunk threads (default) - reply_to_mode: 'all' - All chunks thread to original message Useful for bots in busy groups where threaded replies keep conversations organized. Configurable via gateway.json or TELEGRAM_REPLY_TO_MODE env var. Based on OpenClaw's ReplyToMode implementation.
- Fix forum topic replies: base.py _process_message_background() now passes event.source.thread_id via metadata to send(), so responses land in the correct Telegram forum topic thread - Remove unused _delivery_progress dict from TelegramAdapter - Remove unused chat_id param from _should_thread_reply() - Fix tests to use numeric IDs (matching real Telegram IDs) - Remove redundant @pytest.mark.asyncio (asyncio_mode=auto handles it) - Add TestEnvVarOverride tests for TELEGRAM_REPLY_TO_MODE env var Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
teknium1
pushed a commit
that referenced
this pull request
Mar 11, 2026
Add configurable reply_to_mode for Telegram multi-chunk replies: - off: never thread replies to original message - first: only first chunk threads (default, preserves current behavior) - all: all chunks thread to original message Configurable via reply_to_mode in platform config or TELEGRAM_REPLY_TO_MODE env var. Cherry-picked from PR #855 by raulvidis, rebased onto current main. Dropped asyncio_mode=auto pyproject.toml change, added @pytest.mark.asyncio decorators, fixed test IDs to use numeric strings. Co-authored-by: Raul <77628552+raulvidis@users.noreply.github.com>
Contributor
|
Cherry-picked into PR #956 with contributor credit preserved ( Changes from the original PR:
|
Author
|
Thanks for the merge! I'll keep contributing — aiming to bring the same quality with every PR 🙏 |
teknium1
added a commit
that referenced
this pull request
Mar 25, 2026
Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR #855 by raulvidis.
teknium1
added a commit
that referenced
this pull request
Mar 25, 2026
Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR #855 by raulvidis.
Contributor
|
Your reply threading mode feature has been salvaged and merged via PR #2907. Core logic preserved, adapted to current main. Thanks @raulvidis! |
InB4DevOps
pushed a commit
to InB4DevOps/hermes-agent
that referenced
this pull request
Mar 25, 2026
…ch#2907) Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR NousResearch#855 by raulvidis.
outsourc-e
pushed a commit
to outsourc-e/hermes-agent
that referenced
this pull request
Mar 26, 2026
…ch#2907) Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR NousResearch#855 by raulvidis.
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
…ch#2907) Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR NousResearch#855 by raulvidis.
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 28, 2026
Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR NousResearch#855 by raulvidis.
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 28, 2026
Add configurable reply_to_mode for Telegram multi-chunk replies: - off: never thread replies to original message - first: only first chunk threads (default, preserves current behavior) - all: all chunks thread to original message Configurable via reply_to_mode in platform config or TELEGRAM_REPLY_TO_MODE env var. Cherry-picked from PR NousResearch#855 by raulvidis, rebased onto current main. Dropped asyncio_mode=auto pyproject.toml change, added @pytest.mark.asyncio decorators, fixed test IDs to use numeric strings. Co-authored-by: Raul <77628552+raulvidis@users.noreply.github.com>
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…ch#2907) Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR NousResearch#855 by raulvidis.
olympus-terminal
pushed a commit
to olympus-terminal/hermes-agent
that referenced
this pull request
May 16, 2026
…ch#2907) Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR NousResearch#855 by raulvidis.
CumulusService
pushed a commit
to Cumulus-Service-GmbH/hermes-agent
that referenced
this pull request
May 30, 2026
Add configurable reply_to_mode for Telegram multi-chunk replies: - off: never thread replies to original message - first: only first chunk threads (default, preserves current behavior) - all: all chunks thread to original message Configurable via reply_to_mode in platform config or TELEGRAM_REPLY_TO_MODE env var. Cherry-picked from PR NousResearch#855 by raulvidis, rebased onto current main. Dropped asyncio_mode=auto pyproject.toml change, added @pytest.mark.asyncio decorators, fixed test IDs to use numeric strings. Co-authored-by: Raul <77628552+raulvidis@users.noreply.github.com>
CumulusService
pushed a commit
to Cumulus-Service-GmbH/hermes-agent
that referenced
this pull request
May 30, 2026
Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR NousResearch#855 by raulvidis.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…ch#2907) Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR NousResearch#855 by raulvidis.
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…ch#2907) Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR NousResearch#855 by raulvidis.
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
_process_message_background) properly passesthread_idvia metadata tosend().reply_to_modesetting (off/first/all) controls whether multi-chunk replies thread to the original message. Configurable viareply_to_modein platform config orTELEGRAM_REPLY_TO_MODEenv var. Defaultfirstpreserves existing behavior.Test plan
firstmode) is unchanged from previous behavior🤖 Generated with Claude Code