mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 19:32:27 +00:00
22 lines
680 B
TypeScript
22 lines
680 B
TypeScript
import { buildAgentSessionKey } from "openclaw/plugin-sdk/core";
|
|
|
|
const CHANNEL_ID = "synology-chat";
|
|
|
|
export function buildSynologyChatInboundSessionKey(params: {
|
|
agentId: string;
|
|
accountId: string;
|
|
userId: string;
|
|
identityLinks?: Record<string, string[]>;
|
|
}): string {
|
|
return buildAgentSessionKey({
|
|
agentId: params.agentId,
|
|
channel: CHANNEL_ID,
|
|
accountId: params.accountId,
|
|
peer: { kind: "direct", id: params.userId },
|
|
// Synology Chat supports multiple independent accounts on one gateway.
|
|
// Keep direct-message sessions isolated per account and user.
|
|
dmScope: "per-account-channel-peer",
|
|
identityLinks: params.identityLinks,
|
|
});
|
|
}
|