From 6132c3d014952a99a91cb56e4e104b5ecb08bad1 Mon Sep 17 00:00:00 2001 From: Chloe Date: Mon, 26 Jan 2026 21:47:09 -0800 Subject: [PATCH] fix(telegram): include AccountId in native command context for multi-agent routing When running multiple Telegram bot accounts bound to different agents, the /new command (and other slash commands) would send confirmation messages via the wrong bot because the context was missing AccountId. The fix adds AccountId: route.accountId to the context payload in registerTelegramNativeCommands, matching how bot-message-context.ts handles regular messages. Fixes #2537 --- src/telegram/bot-native-commands.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/telegram/bot-native-commands.ts b/src/telegram/bot-native-commands.ts index 3415ea927..73a5a148a 100644 --- a/src/telegram/bot-native-commands.ts +++ b/src/telegram/bot-native-commands.ts @@ -468,6 +468,7 @@ export const registerTelegramNativeCommands = ({ CommandAuthorized: commandAuthorized, CommandSource: "native" as const, SessionKey: `telegram:slash:${senderId || chatId}`, + AccountId: route.accountId, CommandTargetSessionKey: sessionKey, MessageThreadId: threadIdForSend, IsForum: isForum,