From 9d3636b8287a0f9795e23dd4c3afe5f80af8362d Mon Sep 17 00:00:00 2001 From: brobert Date: Sun, 21 Sep 2025 01:31:04 +0200 Subject: [PATCH] fix: corregir errores de sintaxis y alcance en CommandService Co-authored-by: aider (openrouter/openai/gpt-5) --- src/services/command.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/services/command.ts b/src/services/command.ts index 5fe1d6d..c2887be 100644 --- a/src/services/command.ts +++ b/src/services/command.ts @@ -72,6 +72,7 @@ export class CommandService { dateCandidates.push({ index: i, ymd: low }); dateTokenIndexes.add(i); continue; + } } // Tokens naturales "hoy"/"mañana" (con o sin acento) @@ -229,6 +230,7 @@ export class CommandService { recipient: context.sender, message: '_Este comando se usa en grupos. Prueba:_ `/t ver mis`' }]; + } if (!GroupSyncService.isGroupActive(context.groupId)) { return [{ recipient: context.sender, @@ -539,7 +541,6 @@ export class CommandService { }]; } const enforce = String(process.env.GROUP_MEMBERS_ENFORCE || '').toLowerCase() === 'true'; - const task = TaskService.getTaskById(resolvedId); if (task && task.group_id && GroupSyncService.isSnapshotFresh(task.group_id) && enforce && !GroupSyncService.isUserActiveInGroup(context.sender, task.group_id)) { return [{ recipient: context.sender, @@ -726,7 +727,8 @@ export class CommandService { continue; } - if (task.group_id && GroupSyncService.isSnapshotFresh(task.group_id) && enforce && !GroupSyncService.isUserActiveInGroup(context.sender, task.group_id)) { + const task = TaskService.getTaskById(resolvedId); + if (task && GroupSyncService.isSnapshotFresh(task.group_id) && enforce && !GroupSyncService.isUserActiveInGroup(context.sender, task.group_id)) { lines.push(`🚫 ${codeId(resolvedId)} — no permitido (no eres miembro activo).`); cntBlocked++; continue;