Skip to content

fix(telegram): plain-text fallback shows raw MarkdownV2 backslash escapes - #12037

Merged
lalalune merged 1 commit into
developfrom
fix/telegram-markdownv2-fallback-escapes
Jul 3, 2026
Merged

fix(telegram): plain-text fallback shows raw MarkdownV2 backslash escapes#12037
lalalune merged 1 commit into
developfrom
fix/telegram-markdownv2-fallback-escapes

Conversation

@NubsCarson

Copy link
Copy Markdown
Member

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 escaped chunk with no parse_mode → users saw literal backslashes (Sure\! Step 1 \- done\.). The sibling editMessage fallback already uses cleanText(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.

…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>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1387b08a-2c61-4559-9c8a-0641bd999a07

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/telegram-markdownv2-fallback-escapes

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lalalune
lalalune merged commit 418b320 into develop Jul 3, 2026
31 of 37 checks passed
@lalalune
lalalune deleted the fix/telegram-markdownv2-fallback-escapes branch July 3, 2026 19:28
@claude

claude Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants