mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 11:01:24 +00:00
refactor(discord): split allowlist resolution flow
This commit is contained in:
@@ -108,17 +108,19 @@ export function patchAllowlistUsersInConfigEntries<
|
||||
if (!Array.isArray(users) || users.length === 0) {
|
||||
continue;
|
||||
}
|
||||
const additions = resolveAllowlistIdAdditions({
|
||||
existing: users,
|
||||
resolvedMap: params.resolvedMap,
|
||||
});
|
||||
const resolvedUsers =
|
||||
params.strategy === "canonicalize"
|
||||
? canonicalizeAllowlistWithResolvedIds({
|
||||
existing: users,
|
||||
resolvedMap: params.resolvedMap,
|
||||
})
|
||||
: mergeAllowlist({ existing: users, additions });
|
||||
: mergeAllowlist({
|
||||
existing: users,
|
||||
additions: resolveAllowlistIdAdditions({
|
||||
existing: users,
|
||||
resolvedMap: params.resolvedMap,
|
||||
}),
|
||||
});
|
||||
nextEntries[entryKey] = {
|
||||
...entryConfig,
|
||||
users: resolvedUsers,
|
||||
|
||||
Reference in New Issue
Block a user