From ac158416a51b6b2649db33ae269549a9425e728b Mon Sep 17 00:00:00 2001 From: borja Date: Mon, 8 Sep 2025 16:30:27 +0200 Subject: [PATCH] fix: usar id en completada y generar ack en formato compacto Co-authored-by: aider (openrouter/openai/gpt-5) --- src/services/command.ts | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/services/command.ts b/src/services/command.ts index a6d2961..e548ae3 100644 --- a/src/services/command.ts +++ b/src/services/command.ts @@ -518,7 +518,7 @@ export class CommandService { const due = res.task?.due_date ? ` — ${ICONS.date} ${formatDDMM(res.task?.due_date)}` : ''; return [{ recipient: context.sender, - message: `${ICONS.complete} ${codeId(id)} completada — _${res.task?.description || '(sin descripción)'}_${due}` + message: `${ICONS.complete} ${id} completada — _${res.task?.description || '(sin descripción)'}_${due}` }]; } @@ -784,19 +784,18 @@ export class CommandService { const responses: CommandResponse[] = []; // 1) Ack al creador con formato compacto - const ackHeader = `${ICONS.create} ${codeId(taskId)}`; - const ackLines: string[] = [ackHeader, `${description || '(sin descripción)'}`]; const dueFmt = formatDDMM(dueDate); - if (dueFmt) ackLines.push(`${ICONS.date} ${dueFmt}`); - if (assignmentUserIds.length === 0) { - ackLines.push(`${ICONS.unassigned} sin responsable${groupName ? ` (${groupName})` : ''}`); - } else { - const assigneesList = assignedDisplayNames.join(', '); - ackLines.push(`${assignmentUserIds.length > 1 ? '👥' : '👤'} ${assigneesList}`); - } + const ownerPart = assignmentUserIds.length === 0 + ? `${ICONS.unassigned} sin responsable${groupName ? ` (${groupName})` : ''}` + : `${assignmentUserIds.length > 1 ? '👥' : '👤'} ${assignedDisplayNames.join(', ')}`; + const ackParts = [ + `${ICONS.create} ${taskId} _${description || '(sin descripción)'}_`, + dueFmt ? `${ICONS.date} ${dueFmt}` : null, + ownerPart + ].filter(Boolean); responses.push({ recipient: createdBy, - message: ackLines.join('\n'), + message: ackParts.join(' — '), mentions: mentionsForSending.length > 0 ? mentionsForSending : undefined });