Actualizar server.js

This commit is contained in:
2026-03-23 20:27:15 +00:00
parent 21b169a192
commit 56a1e4606d

View File

@@ -856,7 +856,6 @@ async function procesarConIA(ownerId, mensajeCliente, datosExpediente) {
const esPrimerMensaje = historialChat.length === 0;
let agendaOcupadaTexto = "El técnico tiene la agenda libre en horario laboral.";
let agendaOcupadaTexto = "El técnico tiene la agenda libre en horario laboral.";
if (datosExpediente.worker_id) {
// 🛑 AÑADIDO: Consulta avanzada que lee Duraciones, Bloqueos y Citas Pendientes
const agendaQ = await pool.query(`