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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user