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,4 +1,8 @@
|
||||
import type { BaseProbeResult, MSTeamsConfig } from "openclaw/plugin-sdk/msteams";
|
||||
import {
|
||||
normalizeStringEntries,
|
||||
type BaseProbeResult,
|
||||
type MSTeamsConfig,
|
||||
} from "openclaw/plugin-sdk/msteams";
|
||||
import { formatUnknownError } from "./errors.js";
|
||||
import { loadMSTeamsSdkWithAuth } from "./sdk.js";
|
||||
import { readAccessToken } from "./token-response.js";
|
||||
@@ -35,7 +39,7 @@ function readStringArray(value: unknown): string[] | undefined {
|
||||
if (!Array.isArray(value)) {
|
||||
return undefined;
|
||||
}
|
||||
const out = value.map((entry) => String(entry).trim()).filter(Boolean);
|
||||
const out = normalizeStringEntries(value);
|
||||
return out.length > 0 ? out : undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user