Cherry-pick batch: Telegram adapter (1/2) — 5 of 50 commits#2016
Merged
alexey-pelykh merged 8 commits intomainfrom Mar 27, 2026
Merged
Cherry-pick batch: Telegram adapter (1/2) — 5 of 50 commits#2016alexey-pelykh merged 8 commits intomainfrom
alexey-pelykh merged 8 commits intomainfrom
Conversation
…@mvanhorn) When `replyLike.text` or `replyLike.caption` is an unexpected non-string value (edge case from some Telegram API responses), the reply body was coerced to "[object Object]" via string concatenation. Add a `typeof === "string"` guard to gracefully fall back to empty string, matching the existing pattern used for `quoteText` in the same function. Co-authored-by: Penchan <[email protected]> (cherry picked from commit 988bd78)
Update exact-match test assertions in send.test.ts to include the new allow_sending_without_reply: true parameter. Tests using objectContaining already pass, but several tests use exact object matching. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> (cherry picked from commit b12dc4d)
(cherry picked from commit c11f95e)
When a Telegram message that OpenClaw is replying to gets deleted before delivery, the Telegram API rejects the entire sendMessage call with "message to be replied not found". This causes the bot's response to be silently lost and stuck in the failed delivery queue permanently. Setting allow_sending_without_reply: true tells Telegram to deliver the message as a standalone message if the reply target no longer exists, instead of failing the entire request. Applied to all 6 locations across 4 source files where reply_to_message_id is set: - send.ts: buildTelegramReplyParams (both reply_parameters and plain reply) - bot/delivery.send.ts: buildTelegramSendParams - draft-stream.ts: draft stream reply params - bot-handlers.runtime.ts: error reply messages (file too large, media download failed) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> (cherry picked from commit d264c76)
(cherry picked from commit e1ca5d9)
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.
Cherry-pick batch from upstream
Issue: #1920
Commits: 5 cherry-picked cleanly, 7 already on branch, 38 conflict (blocked by missing prerequisites)
Successfully picked
988bd782f7b12dc4d04dc11f95ecedd264c761cbe1ca5d9cc4Already on branch (7)
4e45a663e7,6a8f5bc12f,6b4c24c2e5,8139f83175,8b438a308b,a90c5092f2,ac5e97097eConflicts (38)
All 38 remaining commits conflict due to missing prerequisite cherry-picks in the telegram extension layer (
extensions/telegram/src/). These files have diverged significantly between fork and upstream.Adaptation
allow_sending_without_replytype error — grammy v1.41 types don't expose this deprecated Bot API property; used spread assertion.Closes #1920
🤖 Generated with Claude Code