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