refactor: dedupe lowercased readers

This commit is contained in:
Peter Steinberger
2026-04-07 08:15:36 +01:00
parent 763dc614c0
commit a5ff85f01c
12 changed files with 28 additions and 24 deletions

View File

@@ -3,6 +3,7 @@ import {
deliverTextOrMediaReply,
resolveSendableOutboundReplyParts,
} from "openclaw/plugin-sdk/reply-payload";
import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
import type { OpenClawConfig } from "../runtime-api.js";
import {
createChannelReplyPipeline,
@@ -72,7 +73,7 @@ export function registerGoogleChatWebhookTarget(target: WebhookTarget): () => vo
}
function normalizeAudienceType(value?: string | null): GoogleChatAudienceType | undefined {
const normalized = value?.trim().toLowerCase();
const normalized = normalizeOptionalString(value)?.toLowerCase();
if (normalized === "app-url" || normalized === "app_url" || normalized === "app") {
return "app-url";
}