Commit b3f1ff34 authored by Sebastián Long's avatar Sebastián Long

Merge tag '1.0.12' into develop

Finish CHATBOTS-14
parents b64f61ab 4a1e1763
...@@ -35,17 +35,18 @@ crisp.CrispClient.on("message:send", async function (message) { ...@@ -35,17 +35,18 @@ crisp.CrispClient.on("message:send", async function (message) {
} }
} }
await darSiguientePaso(message, message.website_id, message.session_id); darSiguientePaso(message, message.website_id, message.session_id)
.catch((ignorar) => {}) //Ignorar error cuando el usuario escribe un mensaje en lugar de usar el picker, o viceversa
}); });
async function darSiguientePaso(message, website_id, session_id) { async function darSiguientePaso(message, website_id, session_id) {
let siguientePaso = await crisp.getSiguientePaso(message.website_id, message.session_id); let siguientePaso = await crisp.getSiguientePaso(message.website_id, message.session_id);
let userData = await crisp.getUserData(website_id, session_id); let userData = await crisp.getUserData(website_id, session_id);
if(website_id === WEBSITE_ID_TURNOS_PROGRAMADOS){ if(website_id === WEBSITE_ID_TURNOS_PROGRAMADOS){
handlerTurnosProgramados[siguientePaso](message, userData, website_id, session_id); return await handlerTurnosProgramados[siguientePaso](message, userData, website_id, session_id);
} }
if(website_id === WEBSITE_ID_IPS_TURNOS_BAJO_DEMANDA){ if(website_id === WEBSITE_ID_IPS_TURNOS_BAJO_DEMANDA){
handlerTurnosBajoDemanda[siguientePaso](message, userData, website_id, session_id); return await handlerTurnosBajoDemanda[siguientePaso](message, userData, website_id, session_id);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment