fix: harden routing/session isolation for followups and heartbeat

This commit is contained in:
Peter Steinberger
2026-02-24 23:13:51 +00:00
parent 7655c0cb3a
commit ccbeb332e0
15 changed files with 209 additions and 15 deletions

View File

@@ -115,9 +115,10 @@ export function resolveSessionDeliveryTarget(params: {
}
}
const accountId = channel && channel === lastChannel ? lastAccountId : undefined;
const threadId = channel && channel === lastChannel ? lastThreadId : undefined;
const mode = params.mode ?? (explicitTo ? "explicit" : "implicit");
const accountId = channel && channel === lastChannel ? lastAccountId : undefined;
const threadId =
mode !== "heartbeat" && channel && channel === lastChannel ? lastThreadId : undefined;
const resolvedThreadId = explicitThreadId ?? threadId;
return {