Actualizar server.js
This commit is contained in:
@@ -514,7 +514,10 @@ async function procesarConIA(ownerId, mensajeCliente, datosExpediente) {
|
||||
const ocupaciones = {};
|
||||
agendaQ.rows.forEach(r => { if(r.date && r.time) { if(!ocupaciones[r.date]) ocupaciones[r.date] = []; ocupaciones[r.date].push(`${r.time} (en ${r.pob || 'otra zona'})`); } });
|
||||
const lineas = Object.keys(ocupaciones).map(d => `- Día ${d}: Ocupado a las ${ocupaciones[d].join(", ")}`);
|
||||
if(lineas.length > 0) agendaOcupadaTexto = lineas.join("\n ");
|
||||
if(lineas.length > 0) {
|
||||
agendaOcupadaTexto = "Citas actuales:\n " + lineas.join("\n ") +
|
||||
"\n 👉 IMPORTANTE: Todas las demás horas (09:00, 11:00, 12:00, etc.) ESTÁN TOTALMENTE LIBRES. Ofrécelas sin miedo.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user