Heartbeat: honor session override
parent
63bf4683c5
commit
26b087c1b4
|
|
@ -346,7 +346,10 @@ describe("runWebHeartbeatOnce", () => {
|
||||||
(call) => call[0]?.Body === HEARTBEAT_PROMPT,
|
(call) => call[0]?.Body === HEARTBEAT_PROMPT,
|
||||||
);
|
);
|
||||||
expect(heartbeatCall?.[0]?.MessageSid).toBe(sessionId);
|
expect(heartbeatCall?.[0]?.MessageSid).toBe(sessionId);
|
||||||
// We only need to assert the resolver saw the override; store seeding is a best-effort.
|
const raw = await fs.readFile(storePath, "utf-8");
|
||||||
|
const stored = raw ? JSON.parse(raw) : {};
|
||||||
|
expect(stored["+1999"]?.sessionId).toBe(sessionId);
|
||||||
|
expect(stored["+1999"]?.updatedAt).toBeDefined();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ export async function runWebHeartbeatOnce(opts: {
|
||||||
sessionId,
|
sessionId,
|
||||||
updatedAt: Date.now(),
|
updatedAt: Date.now(),
|
||||||
};
|
};
|
||||||
saveSessionStore(storePath, store);
|
await saveSessionStore(storePath, store);
|
||||||
}
|
}
|
||||||
const sessionSnapshot = getSessionSnapshot(cfg, to, true);
|
const sessionSnapshot = getSessionSnapshot(cfg, to, true);
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue