Files
vercel__chat/.changeset/fix-telegram-dm-reply.md
Matthew Lewis ee1c025ea7 fix(telegram): fix DM replies failing with "chat not found" (#214)
* fix(telegram): fix DM replies failing with "chat not found"

postChannelMessage was double-wrapping the channel ID with the
telegram: prefix via encodeThreadId, producing "telegram:telegram:<chatId>".
This caused sendMessage to be called with chat_id "telegram" instead of
the actual chat ID. Pass the channel ID directly to postMessage which
already handles prefix resolution via resolveThreadId.

Made-with: Cursor

* test(telegram): add postChannelMessage tests

Verify channel ID is not double-prefixed and works with both
telegram:-prefixed and raw channel IDs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 20:55:25 -07:00

142 B

@chat-adapter/telegram
@chat-adapter/telegram
patch

Fix DM replies failing with "chat not found" due to double-prefixed channel ID in postChannelMessage