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;