Fix Telegram DM last-route metadata leakage (#19491)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 16b025b3aa
Co-authored-by: guirguispierre <22091706+guirguispierre@users.noreply.github.com>
Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com>
Reviewed-by: @obviyus
This commit is contained in:
Pierre
2026-02-21 21:59:59 -08:00
committed by GitHub
parent 54e5f80424
commit 4f700e96af
5 changed files with 86 additions and 4 deletions

View File

@@ -765,7 +765,7 @@ export const buildTelegramMessageContext = async ({
? {
sessionKey: route.mainSessionKey,
channel: "telegram",
to: String(chatId),
to: `telegram:${chatId}`,
accountId: route.accountId,
// Preserve DM topic threadId for replies (fixes #8891)
threadId: dmThreadId != null ? String(dmThreadId) : undefined,