mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:00:43 +00:00
perf: slim telegram target normalization import
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user