fix(telegram): scope DM topic thread keys by chat id (#31064)

* fix(telegram): scope DM topic thread keys by chat id

* test(telegram): update dm topic session-key expectation

* fix(telegram): parse scoped dm thread ids in outbound recovery

* chore(telegram): format accounts config merge block

* test(nodes): simplify mocked exports for ts tuple spreads
This commit is contained in:
Brian Le
2026-03-01 21:54:45 -05:00
committed by GitHub
parent bbab94c1fe
commit f64d25bd3e
11 changed files with 74 additions and 19 deletions

View File

@@ -204,7 +204,7 @@ export const buildTelegramMessageContext = async ({
const dmThreadId = threadSpec.scope === "dm" ? threadSpec.id : undefined;
const threadKeys =
dmThreadId != null
? resolveThreadSessionKeys({ baseSessionKey, threadId: String(dmThreadId) })
? resolveThreadSessionKeys({ baseSessionKey, threadId: `${chatId}:${dmThreadId}` })
: null;
const sessionKey = threadKeys?.sessionKey ?? baseSessionKey;
const mentionRegexes = buildMentionRegexes(cfg, route.agentId);