fix(telegram): plain-text fallback shows raw MarkdownV2 backslash escapes - #12037
Conversation
…kslash escapes
sendMessageInChunks escapes each chunk via convertMarkdownToTelegram, and on a
MarkdownV2 parse-entity 400 the sendWithRetry fallback resent that SAME escaped
chunk with no parse_mode — so the user saw literal backslashes ("Sure\! Step
1 \- done\.") instead of clean text. The sibling editMessage fallback already
does this right (cleanText(text)).
Fix: the fallback sends cleanText(chunks[i]) — the ORIGINAL unescaped chunk —
so a parse failure degrades to clean unformatted text.
Test: new send-resilience case asserting the fallback text carries no backslash
escapes. 37/37 green; red without the fix (fallback text contains backslashes).
typecheck + biome clean. Tracked in #12030.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Tracked in #12030 (Fable-5 hunt).
[cloud-money](cross-lane, connector).Bug (MED, demo-visible): on a MarkdownV2 parse-entity 400,
sendMessageInChunks's plain-text fallback resent the escapedchunkwith noparse_mode→ users saw literal backslashes (Sure\! Step 1 \- done\.). The sibling editMessage fallback already usescleanText(text).Fix: fallback sends
cleanText(chunks[i])(the original unescaped chunk). 37/37 green; red without the fix (fallback text contains backslashes). typecheck + biome clean.