mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 17:24:32 +00:00
refactor: share trimmed string entry normalization
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import { normalizeStringEntries } from "../shared/string-normalization.js";
|
||||
import { projectSafeChannelAccountSnapshotFields } from "./account-snapshot-fields.js";
|
||||
import type { ChannelAccountSnapshot } from "./plugins/types.core.js";
|
||||
import type { ChannelPlugin } from "./plugins/types.plugin.js";
|
||||
@@ -34,7 +35,7 @@ export function formatChannelAllowFrom(params: {
|
||||
allowFrom: params.allowFrom,
|
||||
});
|
||||
}
|
||||
return params.allowFrom.map((entry) => String(entry).trim()).filter(Boolean);
|
||||
return normalizeStringEntries(params.allowFrom);
|
||||
}
|
||||
|
||||
function asRecord(value: unknown): Record<string, unknown> | undefined {
|
||||
|
||||
Reference in New Issue
Block a user