Skip to content

Telegram: messages display raw HTML tags — parse_mode not set in sendMessage/editMessageText #469

@osandum

Description

@osandum

Description

When using the Telegram channel with the Claude Code agent, all responses containing formatted text (bold, italic, code blocks, links) are displayed as raw HTML tags in Telegram instead of rendered formatting.

Example — instead of seeing bold text, the user sees <b>bold text</b>.

Root cause

The aioncore Telegram plugin converts Markdown output from the agent to HTML before sending (confirmed via strings on the binary: regex patterns \*\*(.+?)\*\*<b>$1</b>, `([^`]+)`<code>$1</code>, etc. are present). However, the resulting HTML is sent to Telegram's sendMessage/editMessageText API without setting parse_mode: "HTML". The parse_mode field exists in the TgMessage struct but is never populated.

Telegram's API treats messages with no parse_mode as plain text, causing HTML tags to appear literally.

Steps to reproduce

  1. Configure a Telegram channel with any agent that produces formatted output (e.g. Claude Code)
  2. Send any message that produces a response with formatting (e.g. "explain what markdown is")
  3. Observe raw HTML tags in Telegram instead of rendered text

Expected behavior

Telegram messages are sent with parse_mode: "HTML" so that formatting renders correctly.

Environment

  • aioncore version: v0.1.29
  • AionUI version: 2.1.18
  • Platform: Linux x64 (headless/web mode)
  • Channel: Telegram (long-polling)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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