|
|
|
|
@ -155,6 +155,7 @@ export class CommandService {
|
|
|
|
|
|
|
|
|
|
// Resolver nombres útiles
|
|
|
|
|
const creatorName = await ContactsService.getDisplayName(createdBy);
|
|
|
|
|
const creatorJid = `${createdBy}@s.whatsapp.net`;
|
|
|
|
|
const groupName = groupIdToUse ? GroupSyncService.activeGroupsCache.get(groupIdToUse) : null;
|
|
|
|
|
|
|
|
|
|
const assignedDisplayNames = await Promise.all(
|
|
|
|
|
@ -175,7 +176,10 @@ export class CommandService {
|
|
|
|
|
`✅ Tarea ${taskId} creada:\n` +
|
|
|
|
|
`• ${description || '(sin descripción)'}\n` +
|
|
|
|
|
(dueDate ? `• Vence: ${dueDate}\n` : '') +
|
|
|
|
|
(assignedDisplayNames.length ? `• Asignados: ${assignedDisplayNames.join(', ')}` : '')
|
|
|
|
|
(assignmentUserIds.length
|
|
|
|
|
? `• Asignados: ${assignmentUserIds.map((uid, idx) => `${assignedDisplayNames[idx] || uid} (@${uid})`).join(', ')}`
|
|
|
|
|
: ''),
|
|
|
|
|
mentions: mentionsForSending.length > 0 ? mentionsForSending : undefined
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -187,8 +191,9 @@ export class CommandService {
|
|
|
|
|
`🆕 Nueva tarea:\n` +
|
|
|
|
|
`• ${description || '(sin descripción)'}\n` +
|
|
|
|
|
(dueDate ? `• Vence: ${dueDate}\n` : '') +
|
|
|
|
|
`• Asignada por: ${creatorName || createdBy}` +
|
|
|
|
|
(groupName ? `\n• Grupo: ${groupName}` : '')
|
|
|
|
|
`• Asignada por: ${creatorName || createdBy} (@${createdBy})` +
|
|
|
|
|
(groupName ? `\n• Grupo: ${groupName}` : ''),
|
|
|
|
|
mentions: [creatorJid]
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|