fix(telegram): thread accountId through native command context

Native Telegram commands (slash menu) did not include AccountId in the
message context, causing /reset confirmations to be delivered through
the default Telegram bot instead of the account-specific bot.

The session routing worked correctly (correct agent session was reset)
but the confirmation message delivery used the wrong account because
params.ctx.AccountId was undefined in handleCommands.

Fixes #2038
This commit is contained in:
Glucksberg 2026-01-26 04:54:09 +00:00
parent 96a156ab87
commit 4e860cc67d

View File

@ -485,6 +485,8 @@ export const registerTelegramNativeCommands = ({
// Originating context for sub-agent announce routing
OriginatingChannel: "telegram" as const,
OriginatingTo: `telegram:${chatId}`,
// Multi-account: preserve accountId for command confirmations (e.g., /reset)
AccountId: route.accountId,
});
const disableBlockStreaming =