|
|
|
@ -137,15 +137,14 @@ export class WebhookServer {
|
|
|
|
|
|
|
|
|
|
if (date >= today) {
|
|
|
|
|
dueDate = part;
|
|
|
|
|
} else {
|
|
|
|
|
descriptionParts.push(part); // Keep past dates in description
|
|
|
|
|
continue; // Skip adding to description
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
descriptionParts.push(part);
|
|
|
|
|
// Fall through to add invalid/past dates to description
|
|
|
|
|
}
|
|
|
|
|
descriptionParts.push(part);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const description = descriptionParts.join(' ');
|
|
|
|
|
const description = descriptionParts.join(' ').trim();
|
|
|
|
|
|
|
|
|
|
console.log('🔍 Detected /tarea command:', {
|
|
|
|
|
timestamp: new Date().toISOString(),
|
|
|
|
@ -154,7 +153,7 @@ export class WebhookServer {
|
|
|
|
|
rawMessage: messageText
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const mentions = data.contextInfo?.mentionedJid || [];
|
|
|
|
|
const mentions = data.message?.contextInfo?.mentionedJid || [];
|
|
|
|
|
console.log('✅ Successfully parsed command:', {
|
|
|
|
|
action,
|
|
|
|
|
description,
|
|
|
|
|