unstale

npm / @chat-adapter/telegram

@chat-adapter/telegram

What changed in @chat-adapter/telegram 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

4 breaking16 new APIs and options1 performance10 behavior and defaults19 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

@chat-adapter/telegram 450 changes

Breaking changes 4

  • Telegram animations are now reported as a single video attachment; the redundant document field is no longer reported as a second attachment.

    4.39.0release notes

  • Telegram attachment downloads now enforce a 25 MB size cap and a 30-second timeout using the Web Fetch API, supporting runtimes such as Cloudflare Workers.

    4.39.0release notes

  • Webhook verification is now required by default, with an explicit opt-in for unverified webhooks.

    4.39.0release notes

  • Switches polling configuration to longPolling.

    4.16.0release notes

New APIs and options 16

  • Opt in to Telegram Business mode with businessMode: true. The adapter handles business updates and threads, routes commands and deletes, includes business connection IDs in outbound operations, and caches connection state. Reactions on business threads throw NotImplementedError.

    4.40.0release notes

  • When enabled, replies to the bot's own messages report isMention; the option is off by default and is readable from TELEGRAM_MENTION_ON_REPLY.

    4.39.0release notes

  • Native Telegram drafts are opt-in; set this option to true to restore draft previews in private chats.

    4.38.0release notes

  • Adds a configurable streaming edit interval; edits have a 1100ms floor.

    4.38.0release notes

  • Adds outbound-only Vercel Connect authentication while retaining native webhook verification or polling.

    4.38.0release notes

  • An optional Telegram user allowlist can be configured with allowedUserIds.

    4.35.0release notes

  • The protected sleep helper accepts an optional AbortSignal, allowing stopPolling() to interrupt the polling backoff delay immediately.

    4.35.0release notes

  • A comma-separated environment variable can configure an optional Telegram user allowlist.

    4.35.0release notes

  • Telegram media group uploads now support multiple files and attachments.

    4.34.0release notes

  • Adds native rich message formatting and streaming for Telegram Bot API 10.1.

    4.31.0release notes

  • Adds support for routing Telegram bot commands to Chat SDK slash command handlers.

    4.31.0release notes

  • Adapter internals are protected rather than private, allowing consumers to subclass an adapter and override or extend processUpdate behavior.

    4.29.0release notes

  • Supported Node versions are now set in the package engines metadata.

    4.29.0release notes

  • Telegram attachment uploads now support typed attachments.

    4.29.0release notes

  • Exposes adapter.resetWebhook(...) for resetting the webhook.

    4.16.0release notes

  • Adds Telegram adapter runtime modes: auto, webhook, and polling.

    4.16.0release notes

Performance 1

  • Rich and Markdown native draft updates skip unused plain-text conversion; plain-text fallback and final delivery are unchanged.

    4.40.0release notes

Behavior and default changes 10

  • Telegram file downloads now return portable ArrayBuffer data while preserving Buffer support in the shared attachment contract.

    4.39.0release notes

  • Stickers now report their emoji as text, falling back to the sticker set name and then "sticker", and include an attachment matching their actual format.

    4.39.0release notes

  • Messages containing locations, venues, contacts, polls, dice, games, invoices or stories now have short literal text descriptions instead of empty text; structured payload remains on the raw message.

    4.39.0release notes

  • The adapter owns the post-and-edit loop, streams render the same way in every chat type, and edits stay under Telegram's per-chat rate limit.

    4.38.0release notes

  • Preserves normalized replied-to message context and populates it from Telegram replies.

    4.38.0release notes

  • Incoming Telegram media groups are combined into one message with ordered attachments and the shared caption.

    4.37.0release notes

  • Adds native Telegram private chat draft streaming, with fallback streaming elsewhere.

    4.30.0release notes

  • The adapter now depends on chat as a full dependency rather than an optional dependency.

    4.21.0release notes

  • Parsed messages now convert Telegram message entities to markdown.

    4.21.0release notes

  • Adds table markdown rendering and fully streaming markdown rendering, and improves adapter fallback-render behavior.

    4.16.0release notes

Fixes and other changes 19

  • In regular supergroups, a reply to the bot counts as a mention when mentionOnReply is enabled; ordinary replies are no longer dropped by the forum-topic exclusion.

    4.42.0release notes

  • Messages and captions that fit the length limit are no longer cut at a backtick inside a link destination; cuts inside links, code spans, or underlines remove the incomplete entity before the ellipsis.

    4.41.0release notes

  • Telegram polling waits for handlers to settle before advancing update offsets.

    4.41.0release notes

  • Thread.reply() now replies to its target using Telegram reply_parameters, with support across message types and fallback behavior when rich-message gateways reject the parameter.

    4.39.0release notes

  • A rate-limited final edit is retried once instead of failing the post.

    4.38.0release notes

  • Streaming now respects Telegram streaming rate limits.

    4.38.0release notes

  • Repeated Telegram webhook updates are deduplicated by update ID using the configured state adapter.

    4.38.0release notes

  • Read receipts now target XChat exactly.

    4.38.0release notes

  • Photo attachments are now reported as JPEG.

    4.36.0release notes

  • Normalized attachment metadata now preserves Telegram stable media identifiers, so developers can rely on them when handling attachments.

    4.36.0release notes

  • No longer falsely matches @bot when @bot-dev is mentioned; the same fix applies to the Telegram adapter's isBotMentioned.

    4.34.0release notes

  • Valid MarkdownV2 link URLs containing raw underscores are no longer truncated at entity-marker characters; hard truncation inside a link URL now trims back to before the link.

    4.32.0release notes

  • Telegram typing actions are sent immediately when private message updates arrive.

    4.32.0release notes

  • Round video messages are now returned as video attachments with width and height set to the clip's length, instead of being silently dropped.

    4.29.0release notes

  • Source maps are disabled in published packages.

    4.24.0release notes

  • Posting messages with a markdown field now sets parse_mode to Markdown, not only for card messages.

    4.21.0release notes

  • Fixes DM replies failing with “chat not found” because the channel ID was double-prefixed.

    4.20.0release notes

  • Makes automatic runtime-mode fallback safer.

    4.16.0release notes

  • Fixes adapter initialization when the chat username is missing.

    4.16.0release notes