Heartbeat: honor session override
This commit is contained in:
@@ -346,7 +346,10 @@ describe("runWebHeartbeatOnce", () => {
|
||||
(call) => call[0]?.Body === HEARTBEAT_PROMPT,
|
||||
);
|
||||
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,
|
||||
updatedAt: Date.now(),
|
||||
};
|
||||
saveSessionStore(storePath, store);
|
||||
await saveSessionStore(storePath, store);
|
||||
}
|
||||
const sessionSnapshot = getSessionSnapshot(cfg, to, true);
|
||||
if (verbose) {
|
||||
|
||||
Reference in New Issue
Block a user