refactor(onboarding): reuse allowFrom merge helper in matrix
This commit is contained in:
parent
7632e60d70
commit
d89d951c3e
@ -2,6 +2,7 @@ import type { DmPolicy } from "openclaw/plugin-sdk";
|
||||
import {
|
||||
addWildcardAllowFrom,
|
||||
formatDocsLink,
|
||||
mergeAllowFromEntries,
|
||||
promptChannelAccessConfig,
|
||||
type ChannelOnboardingAdapter,
|
||||
type ChannelOnboardingDmPolicy,
|
||||
@ -118,12 +119,7 @@ async function promptMatrixAllowFrom(params: {
|
||||
continue;
|
||||
}
|
||||
|
||||
const unique = [
|
||||
...new Set([
|
||||
...existingAllowFrom.map((item) => String(item).trim()).filter(Boolean),
|
||||
...resolvedIds,
|
||||
]),
|
||||
];
|
||||
const unique = mergeAllowFromEntries(existingAllowFrom, resolvedIds);
|
||||
return {
|
||||
...cfg,
|
||||
channels: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user