mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
Add routing regression test for session.mainKey precedence
This commit is contained in:
@@ -31,6 +31,19 @@ describe("resolveMainSessionAlias", () => {
|
||||
scope: "per-sender",
|
||||
});
|
||||
});
|
||||
|
||||
it("uses session.mainKey over any legacy routing sessions key", () => {
|
||||
const cfg = {
|
||||
session: { mainKey: " work ", scope: "per-sender" },
|
||||
routing: { sessions: { mainKey: "legacy-main" } },
|
||||
} as OpenClawConfig;
|
||||
|
||||
expect(resolveMainSessionAlias(cfg)).toEqual({
|
||||
mainKey: "work",
|
||||
alias: "work",
|
||||
scope: "per-sender",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("session key display/internal mapping", () => {
|
||||
|
||||
Reference in New Issue
Block a user