mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-28 15:01:41 +03:00
chore: Lint extensions folder.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
export function normalizeNextcloudTalkMessagingTarget(raw: string): string | undefined {
|
||||
const trimmed = raw.trim();
|
||||
if (!trimmed) return undefined;
|
||||
if (!trimmed) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let normalized = trimmed;
|
||||
|
||||
@@ -16,16 +18,22 @@ export function normalizeNextcloudTalkMessagingTarget(raw: string): string | und
|
||||
normalized = normalized.slice("room:".length).trim();
|
||||
}
|
||||
|
||||
if (!normalized) return undefined;
|
||||
if (!normalized) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return `nextcloud-talk:${normalized}`.toLowerCase();
|
||||
}
|
||||
|
||||
export function looksLikeNextcloudTalkTargetId(raw: string): boolean {
|
||||
const trimmed = raw.trim();
|
||||
if (!trimmed) return false;
|
||||
if (!trimmed) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (/^(nextcloud-talk|nc-talk|nc):/i.test(trimmed)) return true;
|
||||
if (/^(nextcloud-talk|nc-talk|nc):/i.test(trimmed)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return /^[a-z0-9]{8,}$/i.test(trimmed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user