Skip to content

[Bug]: Telegram: sendMessageDraft preview renders LTR for RTL languages (Hebrew/Arabic) #32852

@taibaran

Description

@taibaran

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

  1. Configure OpenClaw with Telegram + streaming: partial
  2. Send a Hebrew message to the bot
  3. Observe the streaming preview — it renders LTR
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions