mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-18 05:20:48 +00:00
14 lines
441 B
TypeScript
14 lines
441 B
TypeScript
import { normalizeTelegramLookupTarget } from "../../../telegram/targets.js";
|
|
|
|
export function normalizeTelegramMessagingTarget(raw: string): string | undefined {
|
|
const normalized = normalizeTelegramLookupTarget(raw);
|
|
if (!normalized) {
|
|
return undefined;
|
|
}
|
|
return `telegram:${normalized}`.toLowerCase();
|
|
}
|
|
|
|
export function looksLikeTelegramTargetId(raw: string): boolean {
|
|
return Boolean(normalizeTelegramLookupTarget(raw));
|
|
}
|