openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
12 lines (11 loc) • 548 B
JavaScript
import { c as normalizeOptionalLowercaseString } from "./string-coerce-6kR-86XC.mjs";
import { t as findRegisteredChannelPluginEntry } from "./registry-lookup-Bsuj69mc.mjs";
//#region src/channels/registry-normalize.ts
/** Normalizes user/config channel identifiers so aliases resolve to canonical channel ids. */
function normalizeAnyChannelId(raw) {
const key = normalizeOptionalLowercaseString(raw);
if (!key) return null;
return findRegisteredChannelPluginEntry(key)?.plugin.id ?? null;
}
//#endregion
export { normalizeAnyChannelId as t };