-
-
Notifications
You must be signed in to change notification settings - Fork 69.2k
[Bug]: Telegram: sendMessageDraft preview renders LTR for RTL languages (Hebrew/Arabic) #32852
Description
Bug type
Behavior bug (incorrect output/state without crash)
Summary
Bug Report
OpenClaw version: 2026.3.2
Channel: Telegram DM
Language: Hebrew (likely affects Arabic and other RTL languages too)
What happened
Since sendMessageDraft was introduced for DM streaming in 2026.3.2, streaming previews render left-to-right for Hebrew text. The final settled message renders correctly (RTL), but the live draft preview always starts LTR.
Expected behavior
Hebrew/Arabic streaming previews should render RTL from the first character.
Root cause (likely)
sendMessageDraft sends raw text without parse_mode=HTML, so Telegram has no explicit directionality signal during streaming. The final message uses HTML rendering which triggers correct RTL detection.
Suggested fix
Prepend a Unicode RLM mark (\u200F) to draft text when the content is detected as RTL, or when the channel locale is RTL. This is a zero-width character that signals Telegram to render the message RTL without affecting the visible text.
Steps to reproduce
- Configure OpenClaw with Telegram +
streaming: partial - Send a Hebrew message to the bot
- Observe the streaming preview — it renders LTR
- After the response settles, it renders correctly RTL
Expected behavior
Hebrew/Arabic streaming previews should render RTL from the first character.
Actual behavior
During sendMessageDraft streaming preview, Hebrew (RTL) text renders left-to-right. The final settled message renders correctly RTL.
OpenClaw version
2026.3.2
Operating system
Ubuntu 24.04
Install method
Ubuntu 24.04
Logs, screenshots, and evidence
Reproducible on Telegram DM with Hebrew responses.
Streaming preview: LTR rendering
Final message: correct RTL rendering
Likely cause: sendMessageDraft sends raw text without parse_mode=HTML,
so Telegram has no RTL signal during streaming.
Suggested fix: prepend Unicode RLM mark (\u200F) to draft text for RTL content.Impact and severity
No response
Additional information
No response