From c6b21e74934bd36e465a6fee6a0df85184200d6a Mon Sep 17 00:00:00 2001 From: robbyczgw-cla Date: Wed, 29 Apr 2026 14:20:25 +0000 Subject: [PATCH] fix(channels/telegram): wire maxTextLength to engage splitter from #1900 PR #1900 added the splitForLimit helper and maxTextLength config option, but explicitly flagged that channel adapters need a follow-up to wire it. This commit completes the wiring for Telegram. Without this, the telegram adapter silently truncates outbound messages >4096 chars via legacy truncateMessage() behavior. With this fix, the splitter engages and posts chunks sequentially. The returned id is the first chunk's id so edits/reactions still target the reply head. --- src/channels/telegram.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/channels/telegram.ts b/src/channels/telegram.ts index dfd42323f..ef85bd4d1 100644 --- a/src/channels/telegram.ts +++ b/src/channels/telegram.ts @@ -210,6 +210,7 @@ registerChannelAdapter('telegram', { extractReplyContext, supportsThreads: false, transformOutboundText: sanitizeTelegramLegacyMarkdown, + maxTextLength: 4000, }); const botUsernamePromise = fetchBotUsername(token);