mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
a2a68d154b
* fix(agent): honor recipient session routing Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> Co-authored-by: pingfanfan <pingfan.work@gmail.com> * fix(agent): preserve canonical recipient routes * fix(agent): require exact recipient routes Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> Co-authored-by: pingfanfan <pingfan.work@gmail.com> * fix(agent): harden recipient route resolution * fix(imessage): require canonical recipient handles * fix(agent): refine provider recipient exactness * fix(agent): bound direct alias session routing * fix(signal): preserve direct alias route type * fix(agent): honor binding-scoped recipient sessions * fix(routing): honor configured main session aliases * fix(clickclack): align account-owned session routes * fix(twitch): preserve canonical recipient sessions * fix(routing): isolate stable outbound identities * chore: defer recipient session changelog * fix(sms): use dedicated channel SDK facade --------- Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com> Co-authored-by: pingfanfan <pingfan.work@gmail.com>
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { signalPlugin } from "./channel.js";
|
|
|
|
describe("Signal outbound session routing", () => {
|
|
it("rejects username aliases as canonical recipient sessions", async () => {
|
|
const route = await signalPlugin.messaging?.resolveOutboundSessionRoute?.({
|
|
cfg: {},
|
|
agentId: "main",
|
|
target: "username:alice.01",
|
|
});
|
|
|
|
expect(route?.recipientSessionExact).toBe("direct-alias");
|
|
});
|
|
|
|
it("accepts canonical phone recipients", async () => {
|
|
const route = await signalPlugin.messaging?.resolveOutboundSessionRoute?.({
|
|
cfg: {},
|
|
agentId: "main",
|
|
target: "+15551234567",
|
|
});
|
|
|
|
expect(route?.recipientSessionExact).toBe(true);
|
|
});
|
|
|
|
it("does not claim UUID recipients that inbound may canonicalize to a phone", async () => {
|
|
const route = await signalPlugin.messaging?.resolveOutboundSessionRoute?.({
|
|
cfg: {},
|
|
agentId: "main",
|
|
target: "uuid:123e4567-e89b-12d3-a456-426614174000",
|
|
});
|
|
|
|
expect(route?.recipientSessionExact).toBe("direct-alias");
|
|
});
|
|
});
|