From 7985e1072f93a316b481f9b86333d1d30cc698b4 Mon Sep 17 00:00:00 2001 From: smith-vosburg Date: Sun, 17 May 2026 15:32:54 -0700 Subject: [PATCH] feat(telegram): enable message_reaction + callback_query in allowedUpdates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without explicitly setting `allowedUpdates`, Telegram excludes update types it considers "advanced" from the polling response by default, including `message_reaction` (added in Bot API 7.0, Feb 2024) and `callback_query`. Once any explicit list is provided, all wanted types must be enumerated. This passes `longPolling.allowedUpdates` with the existing default pair (`message`, `edited_message`) plus `callback_query` and `message_reaction`. The Chat SDK's `processReaction` handler is already wired end-to-end — this commit just asks Telegram to deliver the events. `callback_query` is added pre-emptively so future inline-keyboard adopters don't need another config edit. Behavior for groups that don't consume reactions or callback queries is unchanged — they simply receive update types they ignore (same as today they receive `edited_message` updates that most don't act on). Co-Authored-By: Claude Opus 4.7 --- src/channels/telegram.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/channels/telegram.ts b/src/channels/telegram.ts index c9307eb229b..3bfea33656d 100644 --- a/src/channels/telegram.ts +++ b/src/channels/telegram.ts @@ -203,6 +203,16 @@ registerChannelAdapter('telegram', { const telegramAdapter = createTelegramAdapter({ botToken: token, mode: 'polling', + longPolling: { + // Reactions and callback queries are not included in Telegram's + // default allowed_updates set — once we set this list explicitly, + // all wanted update types must be enumerated. message + edited_message + // are the existing baseline; message_reaction unlocks 👍/👎 ingestion + // (Chat SDK already routes via processReaction); callback_query is + // included pre-emptively so future inline-keyboard work doesn't need + // another config edit. + allowedUpdates: ['message', 'edited_message', 'callback_query', 'message_reaction'], + }, }); const bridge = createChatSdkBridge({ adapter: telegramAdapter,