mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 15:24:58 +00:00
fix(cron): preserve telegram announce target + delivery truth
This commit is contained in:
@@ -17,9 +17,17 @@ function asObjectRecord(value: unknown): Record<string, unknown> | null {
|
||||
return value as Record<string, unknown>;
|
||||
}
|
||||
|
||||
function normalizeTelegramLookupTargetForMatch(raw: string): string | undefined {
|
||||
const normalized = normalizeTelegramLookupTarget(raw);
|
||||
if (!normalized) {
|
||||
return undefined;
|
||||
}
|
||||
return normalized.startsWith("@") ? normalized.toLowerCase() : normalized;
|
||||
}
|
||||
|
||||
function normalizeTelegramTargetForMatch(raw: string): string | undefined {
|
||||
const parsed = parseTelegramTarget(raw);
|
||||
const normalized = normalizeTelegramLookupTarget(parsed.chatId);
|
||||
const normalized = normalizeTelegramLookupTargetForMatch(parsed.chatId);
|
||||
if (!normalized) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -49,7 +57,7 @@ function resolveLegacyRewrite(params: {
|
||||
if (normalizeTelegramChatId(parsed.chatId)) {
|
||||
return null;
|
||||
}
|
||||
const normalized = normalizeTelegramLookupTarget(parsed.chatId);
|
||||
const normalized = normalizeTelegramLookupTargetForMatch(parsed.chatId);
|
||||
if (!normalized) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user