fix: normalize delivery routing context

Co-authored-by: adam91holt <adam91holt@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-01-17 06:38:15 +00:00
parent eb8a0510e0
commit 65a8a93854
14 changed files with 220 additions and 110 deletions

View File

@@ -128,6 +128,7 @@ describe("gateway server sessions", () => {
thinkingLevel?: string;
verboseLevel?: string;
lastAccountId?: string;
deliveryContext?: { channel?: string; to?: string; accountId?: string };
}>;
}>(ws, "sessions.list", { includeGlobal: false, includeUnknown: false });
@@ -140,6 +141,11 @@ describe("gateway server sessions", () => {
expect(main?.thinkingLevel).toBe("low");
expect(main?.verboseLevel).toBe("on");
expect(main?.lastAccountId).toBe("work");
expect(main?.deliveryContext).toEqual({
channel: "whatsapp",
to: "+1555",
accountId: "work",
});
const active = await rpcReq<{
sessions: Array<{ key: string }>;