fix(telegram): fallback blank rich previews#1121
Merged
artemgetmann merged 4 commits intoJul 8, 2026
Merged
Conversation
- Stop attaching native rich_message payloads to streamed Telegram draft previews. - Force final preview edits through legacy HTML because Telegram can accept rich edits but render blank bubbles. - Risk: streamed previews lose native rich tables, while durable final sends keep the guarded rich path.
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
sendMessage/editMessageTextwhen Telegram reports blank rich output.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Telegram preview bubbles should no longer remain blank when the rich-message API returns an empty visible response; the preview path falls back to legacy text rendering.
Security Impact (required)
Yes, explain risk + mitigation: N/ARepro + Verification
Environment
@Artem_jarvis_email_botSteps
codex/telegram-rich-final-transport-20260706.pnpm openclaw:local telegram smoke reply-contract --json.Expected
Actual
Evidence
Failing live evidence before this patch:
reply-contractartifact:.artifacts/telegram-smoke/20260708T105316Z-reply-contract-49d51303.json55115and55116from@Artem_jarvis_email_bothad empty text.final_send_completed ... textLength=65 ... result=deliveredtelegram sendMessage ok ... message=1184 (plain)Passing local proof after this patch:
pnpm exec vitest run extensions/telegram/src/draft-stream.test.tspnpm exec vitest run extensions/telegram/src/draft-stream.test.ts extensions/telegram/src/bot/delivery.test.ts extensions/telegram/src/send.test.ts extensions/telegram/src/bot-message-dispatch.test.tspnpm buildHuman Verification (required)
Review Conversations
Compatibility / Migration
Failure Recovery (if this breaks)
extensions/telegram/src/draft-stream.ts,extensions/telegram/src/draft-stream.test.ts.Risks and Mitigations