perf: slim telegram target normalization import

This commit is contained in:
Peter Steinberger
2026-04-24 00:24:56 +01:00
parent 697fc38d1a
commit 1e24bee879

View File

@@ -1,8 +1,11 @@
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
import { normalizeTelegramLookupTarget, parseTelegramTarget } from "./targets.js";
const TELEGRAM_PREFIX_RE = /^(telegram|tg):/i;
function normalizeLowercaseStringOrEmpty(value: unknown): string {
return typeof value === "string" ? value.trim().toLowerCase() : "";
}
function normalizeTelegramTargetBody(raw: string): string | undefined {
const trimmed = raw.trim();
if (!trimmed) {