|
|
|
@ -518,7 +518,7 @@ export class CommandService {
|
|
|
|
const due = res.task?.due_date ? ` — ${ICONS.date} ${formatDDMM(res.task?.due_date)}` : '';
|
|
|
|
const due = res.task?.due_date ? ` — ${ICONS.date} ${formatDDMM(res.task?.due_date)}` : '';
|
|
|
|
return [{
|
|
|
|
return [{
|
|
|
|
recipient: context.sender,
|
|
|
|
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[] = [];
|
|
|
|
const responses: CommandResponse[] = [];
|
|
|
|
|
|
|
|
|
|
|
|
// 1) Ack al creador con formato compacto
|
|
|
|
// 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);
|
|
|
|
const dueFmt = formatDDMM(dueDate);
|
|
|
|
if (dueFmt) ackLines.push(`${ICONS.date} ${dueFmt}`);
|
|
|
|
const ownerPart = assignmentUserIds.length === 0
|
|
|
|
if (assignmentUserIds.length === 0) {
|
|
|
|
? `${ICONS.unassigned} sin responsable${groupName ? ` (${groupName})` : ''}`
|
|
|
|
ackLines.push(`${ICONS.unassigned} sin responsable${groupName ? ` (${groupName})` : ''}`);
|
|
|
|
: `${assignmentUserIds.length > 1 ? '👥' : '👤'} ${assignedDisplayNames.join(', ')}`;
|
|
|
|
} else {
|
|
|
|
const ackParts = [
|
|
|
|
const assigneesList = assignedDisplayNames.join(', ');
|
|
|
|
`${ICONS.create} ${taskId} _${description || '(sin descripción)'}_`,
|
|
|
|
ackLines.push(`${assignmentUserIds.length > 1 ? '👥' : '👤'} ${assigneesList}`);
|
|
|
|
dueFmt ? `${ICONS.date} ${dueFmt}` : null,
|
|
|
|
}
|
|
|
|
ownerPart
|
|
|
|
|
|
|
|
].filter(Boolean);
|
|
|
|
responses.push({
|
|
|
|
responses.push({
|
|
|
|
recipient: createdBy,
|
|
|
|
recipient: createdBy,
|
|
|
|
message: ackLines.join('\n'),
|
|
|
|
message: ackParts.join(' — '),
|
|
|
|
mentions: mentionsForSending.length > 0 ? mentionsForSending : undefined
|
|
|
|
mentions: mentionsForSending.length > 0 ? mentionsForSending : undefined
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|