mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-23 07:51:33 +00:00
Plugins: scope SDK imports and harden Matrix routing
This commit is contained in:
@@ -44,9 +44,9 @@ function parseChannel(raw: unknown, channels: PairingChannel[]): PairingChannel
|
||||
throw new Error(`Invalid channel: ${value}`);
|
||||
}
|
||||
|
||||
async function notifyApproved(channel: PairingChannel, id: string) {
|
||||
async function notifyApproved(channel: PairingChannel, id: string, accountId?: string) {
|
||||
const cfg = loadConfig();
|
||||
await notifyPairingApproved({ channelId: channel, id, cfg });
|
||||
await notifyPairingApproved({ channelId: channel, id, cfg, accountId });
|
||||
}
|
||||
|
||||
export function registerPairingCli(program: Command) {
|
||||
@@ -166,7 +166,7 @@ export function registerPairingCli(program: Command) {
|
||||
if (!opts.notify) {
|
||||
return;
|
||||
}
|
||||
await notifyApproved(channel, approved.id).catch((err) => {
|
||||
await notifyApproved(channel, approved.id, accountId || undefined).catch((err) => {
|
||||
defaultRuntime.log(theme.warn(`Failed to notify requester: ${String(err)}`));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user