mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
refactor: share trimmed list normalization in provider helpers
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
import { resolveAllowlistMatchByCandidates, type AllowlistMatch } from "openclaw/plugin-sdk/matrix";
|
||||
import {
|
||||
normalizeStringEntries,
|
||||
resolveAllowlistMatchByCandidates,
|
||||
type AllowlistMatch,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
|
||||
function normalizeAllowList(list?: Array<string | number>) {
|
||||
return (list ?? []).map((entry) => String(entry).trim()).filter(Boolean);
|
||||
return normalizeStringEntries(list);
|
||||
}
|
||||
|
||||
function normalizeMatrixUser(raw?: string | null): string {
|
||||
|
||||
Reference in New Issue
Block a user