refactor: dedupe provider lowercase helpers

This commit is contained in:
Peter Steinberger
2026-04-07 14:23:05 +01:00
parent f2b13b0a1a
commit ad605052bf
8 changed files with 23 additions and 12 deletions

View File

@@ -5,6 +5,7 @@ import {
} from "openclaw/plugin-sdk/reply-payload";
import { isPrivateNetworkOptInEnabled } from "openclaw/plugin-sdk/ssrf-runtime";
import {
normalizeLowercaseStringOrEmpty,
normalizeOptionalLowercaseString,
normalizeOptionalString,
} from "openclaw/plugin-sdk/text-runtime";
@@ -319,7 +320,7 @@ function consumePendingOutboundMessageId(params: {
}): PendingOutboundMessageId | null {
prunePendingOutboundMessageIds();
const bodyNorm = normalizeSnippet(params.body);
const isMediaBody = params.body.trim().toLowerCase().startsWith("<media:");
const isMediaBody = normalizeLowercaseStringOrEmpty(params.body).startsWith("<media:");
for (let i = 0; i < pendingOutboundMessageIds.length; i++) {
const entry = pendingOutboundMessageIds[i];