mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
refactor(onboarding): simplify zalo allowFrom merge paths
This commit is contained in:
@@ -148,11 +148,7 @@ async function promptZaloAllowFrom(params: {
|
||||
},
|
||||
});
|
||||
const normalized = String(entry).trim();
|
||||
const merged = [
|
||||
...existingAllowFrom.map((item) => String(item).trim()).filter(Boolean),
|
||||
normalized,
|
||||
];
|
||||
const unique = mergeAllowFromEntries(undefined, merged);
|
||||
const unique = mergeAllowFromEntries(existingAllowFrom, [normalized]);
|
||||
|
||||
if (accountId === DEFAULT_ACCOUNT_ID) {
|
||||
return {
|
||||
|
||||
@@ -122,11 +122,7 @@ async function promptZalouserAllowFrom(params: {
|
||||
);
|
||||
continue;
|
||||
}
|
||||
const merged = [
|
||||
...existingAllowFrom.map((item) => String(item).trim()).filter(Boolean),
|
||||
...(results.filter(Boolean) as string[]),
|
||||
];
|
||||
const unique = mergeAllowFromEntries(undefined, merged);
|
||||
const unique = mergeAllowFromEntries(existingAllowFrom, results.filter(Boolean) as string[]);
|
||||
if (accountId === DEFAULT_ACCOUNT_ID) {
|
||||
return {
|
||||
...cfg,
|
||||
|
||||
Reference in New Issue
Block a user