fix(telegram): draft stream preview not threaded when replyToMode is on (#17880)#17928
Merged
obviyus merged 7 commits intoopenclaw:mainfrom Feb 16, 2026
Merged
Conversation
d333aa0 to
8228a60
Compare
…+ draft-stream edge cases
…ng threadParams style
d0eaad8 to
cfd4181
Compare
Contributor
|
Merged via squash. Thanks @yinghaosang! |
Archeb
pushed a commit
to Archeb/openclaw
that referenced
this pull request
Feb 16, 2026
…on (openclaw#17880) (openclaw#17928) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: cfd4181 Co-authored-by: yinghaosang <[email protected]> Co-authored-by: obviyus <[email protected]> Reviewed-by: @obviyus
thinstripe
pushed a commit
to thinstripe/openclaw
that referenced
this pull request
Feb 16, 2026
…on (openclaw#17880) (openclaw#17928) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: cfd4181 Co-authored-by: yinghaosang <[email protected]> Co-authored-by: obviyus <[email protected]> Reviewed-by: @obviyus
Closed
6 tasks
archerhpagent
pushed a commit
to howardpark/openclaw
that referenced
this pull request
Feb 18, 2026
…on (openclaw#17880) (openclaw#17928) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: cfd4181 Co-authored-by: yinghaosang <[email protected]> Co-authored-by: obviyus <[email protected]> Reviewed-by: @obviyus
jun-planfit
pushed a commit
to planfit/openclaw
that referenced
this pull request
Feb 19, 2026
…on (openclaw#17880) (openclaw#17928) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: cfd4181 Co-authored-by: yinghaosang <[email protected]> Co-authored-by: obviyus <[email protected]> Reviewed-by: @obviyus
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…on (openclaw#17880) (openclaw#17928) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: cfd4181 Co-authored-by: yinghaosang <[email protected]> Co-authored-by: obviyus <[email protected]> Reviewed-by: @obviyus
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
When
streamMode: "partial"is active, Telegram reply threading doesn't work even withreplyToMode: "all". The draft stream preview message gets sent withoutreply_to_message_id, and since the final reply is an edit to that same message, threading is permanently lost.Closes #17880
lobster-biscuit
Root Cause
createTelegramDraftStreamindraft-stream.tsonly passes forum topic thread params (message_thread_id) to the initialsendMessagecall. It never receives or forwardsreply_to_message_id. The call site inbot-message-dispatch.tsdoesn't pass it either.Changes
reply_to_message_id— replies aren't threaded in partial/block stream modereplyToMessageIdthreaded throughcreateTelegramDraftStreamand merged into thesendMessageparams, gated onreplyToMode !== "off"replyParamsconstruction follows the same flat ternary style as the existingthreadParamspattern (no IIFE)Tests
draft-stream.test.ts— 4 new tests:replyToMessageIdpassed without threadreply_to_message_idandmessage_thread_idpresentundefinedreply_to_message_idstill set when thread resolves to general topic (id=1)bot-message-dispatch.test.ts— 2 additions:replyToMessageId: 456is passed tocreateTelegramDraftStreamreplyToMode: "off"→replyToMessageIdisundefinedpnpm build && pnpm checkpassGreptile Summary
Fixes Telegram reply threading for draft stream preview messages. When
streamMode: "partial"(or"block") is active, the initial preview message sent viacreateTelegramDraftStreamwas missingreply_to_message_id, causing threading to be permanently lost since the final reply is an edit of that same message.replyToMessageIdparameter tocreateTelegramDraftStreamand merges it into thesendMessageparams alongside existingmessage_thread_id(forum topic) supportdraftReplyToMessageIdinbot-message-dispatch.ts, gated onreplyToMode !== "off", consistent with howdelivery.tshandles reply threadingreplyParamsconstruction correctly handles all edge cases: reply-only, reply+thread combo, neither, and general topic (id=1) wheremessage_thread_idis suppressed butreply_to_message_idis preserveddraft-stream.test.tsand 2 additions inbot-message-dispatch.test.tsConfidence Score: 5/5
replyToMessageIdthrough to the draft stream's initialsendMessagecall. ThereplyParamsconstruction correctly handles all edge cases (reply-only, reply+thread, neither, general topic). The gating onreplyToMode !== "off"is consistent with the existing delivery path. Six new tests cover the relevant scenarios. No behavioral changes to existing code paths.Last reviewed commit: d0eaad8