mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 12:26:12 +00:00
refactor(onboarding): reuse allowFrom merge helper in extensions
This commit is contained in:
@@ -2,6 +2,7 @@ import type { OpenClawConfig, DmPolicy } from "openclaw/plugin-sdk";
|
||||
import {
|
||||
addWildcardAllowFrom,
|
||||
formatDocsLink,
|
||||
mergeAllowFromEntries,
|
||||
promptAccountId,
|
||||
type ChannelOnboardingAdapter,
|
||||
type ChannelOnboardingDmPolicy,
|
||||
@@ -61,7 +62,7 @@ async function promptAllowFrom(params: {
|
||||
validate: (value) => (String(value ?? "").trim() ? undefined : "Required"),
|
||||
});
|
||||
const parts = parseAllowFromInput(String(entry));
|
||||
const unique = [...new Set(parts)];
|
||||
const unique = mergeAllowFromEntries(undefined, parts);
|
||||
return {
|
||||
...params.cfg,
|
||||
channels: {
|
||||
|
||||
Reference in New Issue
Block a user