mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 20:35:39 -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>
44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
// Tlon plugin module implements session route behavior.
|
|
import {
|
|
buildChannelOutboundSessionRoute,
|
|
type ChannelOutboundSessionRouteParams,
|
|
} from "openclaw/plugin-sdk/core";
|
|
import { parseTlonTarget } from "./targets.js";
|
|
|
|
export function resolveTlonOutboundSessionRoute(params: ChannelOutboundSessionRouteParams) {
|
|
const parsed = parseTlonTarget(params.target);
|
|
if (!parsed) {
|
|
return null;
|
|
}
|
|
if (parsed.kind === "group") {
|
|
return buildChannelOutboundSessionRoute({
|
|
cfg: params.cfg,
|
|
agentId: params.agentId,
|
|
channel: "tlon",
|
|
accountId: params.accountId,
|
|
recipientSessionExact: true,
|
|
peer: {
|
|
kind: "group",
|
|
id: parsed.nest,
|
|
},
|
|
chatType: "group",
|
|
from: `tlon:group:${parsed.nest}`,
|
|
to: `tlon:${parsed.nest}`,
|
|
});
|
|
}
|
|
return buildChannelOutboundSessionRoute({
|
|
cfg: params.cfg,
|
|
agentId: params.agentId,
|
|
channel: "tlon",
|
|
accountId: params.accountId,
|
|
recipientSessionExact: true,
|
|
peer: {
|
|
kind: "direct",
|
|
id: parsed.ship,
|
|
},
|
|
chatType: "direct",
|
|
from: `tlon:${parsed.ship}`,
|
|
to: `tlon:${parsed.ship}`,
|
|
});
|
|
}
|