Commit 5c15fa05 authored by Gabriel's avatar Gabriel

Agrega icono de 'escribiendo' luego de ingresar email

parent cb2c0abf
......@@ -40,6 +40,10 @@ async function composeMessage(website_id, session_id, ms){
);
}
async function showWritingIcon(website_id, session_id){
await composeMessage(website_id, session_id, DELAY_MS);
}
async function sendPickerMessage(website_id, session_id, id, title, choices) {
await composeMessage(website_id, session_id, DELAY_MS);
await CrispClient.websiteConversations.sendMessage(
......@@ -102,6 +106,7 @@ async function updateUserData(website_id, session_id, data) {
module.exports =
{
CrispClient: CrispClient,
showWritingIcon: showWritingIcon,
sendTextMessage: sendTextMessage,
sendPickerMessage: sendPickerMessage,
getSiguientePaso: getSiguientePaso,
......
......@@ -120,6 +120,7 @@ module.exports =
await crisp.sendTextMessage(website_id, session_id, 'Ingresá tu correo electrónico');
},
resp_correo: async function(message, userData, website_id, session_id){
await crisp.showWritingIcon(website_id, session_id);
userData[CORREO] = message.content;
let existeUsuario = await is.existeUsuario(userData[TIPO_DOCUMENTO], userData[NUMERO_DOCUMENTO], userData[FECHA_NACIMIENTO], userData[SEXO]);
if(existeUsuario.existe){
......
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