Skip to content

[Telegram] Bot messages show as "Unknown" and cannot be read #30817

Closed

Description

@fatherkam

Extension

https://www.raycast.com/ikupenov/telegram

Raycast Version

2.2.0.0

OS Version

macOS Tahoe 26.6.2 arm64

Description

messages with my openclaw bot on the latest version of OC appear as "unknown" so I can't see any of the messages.

Steps To Reproduce

  1. Have an openclaw set up as a bot in telegram
  2. Have it send you messages, images or anything really
  3. message from bot appears as "unknown"

Current Behaviour

No response

Expected Behaviour

No response

Activity

  1. added
    bug
    extension
    on Sep 6, 2026
  2. added theissue type on Sep 6, 2026
  3. added
    extension: telegram
    on Sep 6, 2026
  4. raycastbot commented on Sep 6, 2026

    @raycastbot
    Collaborator

    Thank you for opening this issue!

    🔔 @ikupenov you might want to have a look.

    💡 Author and Contributors commands

    The author and contributors of ikupenov/telegram can trigger bot actions by commenting:

    • @raycastbot close this issue Closes the issue.
    • @raycastbot close as not planned Closes the issue as not planned.
    • @raycastbot close as duplicate Closes the issue as duplicate.
    • @raycastbot rename this issue to "Awesome new title" Renames the issue.
    • @raycastbot reopen this issue Reopens the issue.
    • @raycastbot assign me Assigns yourself to the issue.
    • @raycastbot good first issue Adds the "Good first issue" label to the issue.
    • @raycastbot keep this issue open Make sure the issue won't go stale and will be kept open by the bot.
  5. changed the title [-][Telegram][/-] [+][Telegram] Bot messages show as "Unknown" and cannot be read[/+] on Sep 6, 2026
  6. fatherkam commented on Sep 6, 2026

    @fatherkam
    ContributorAuthor

    I dug into this and found the root cause. It isn't specific to OpenClaw — it affects any bot using Telegram's rich message format, and it's two separate problems stacked on each other.

    1. The content never arrives. The extension depends on GramJS (the telegram package), which is archived on GitHub and deprecated on npm, and is pinned to MTProto layer 198. Telegram's servers are on 225+. Rich messages for bots landed in layer 228, and for a client announcing an older layer the server doesn't downgrade the content — it withholds it, substituting messageMediaUnsupported with the text stripped out. The extension maps that to an "unknown" media type, which is where the literal "Unknown" in the message row comes from. So there was nothing to render, and no amount of client-side handling would have fixed it.

    2. Once the content does arrive, it gets filtered out. Rich messages carry their content in message.richMessage as a block tree rather than in the flat message.message string. Both message fetchers filter with msg.message || msg.media, so every rich message is dropped before it reaches the list — the messages disappear entirely rather than showing as "Unknown".

    Both halves need fixing for bot messages to actually appear.

    I've opened PRs for this:

    They're stacked in that order. The dependency swap in #30836 is the significant change and I've tried to justify it in the PR body — I also tested an npm-alias alternative that avoids touching the imports, and explain there why I didn't go with it.

    Verified with ray develop against a live account: bot messages that previously showed as "Unknown" now render with their formatting intact.

    @ikupenov — no urgency at all, but flagging since it touches the dependency. Happy to split, reshape, or drop any of it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugextensionextension: telegramplatform: macOS

    Type

    Fields

    Priority

    None yet

    Severity

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions