Commit 0fd49a6d authored by Sebastián Long's avatar Sebastián Long

Finish sendinblue-error

parents 6de9840e a5f56bac
......@@ -31,6 +31,7 @@ crisp.CrispClient.on("message:send", async function (message) {
});
async function enviarUserAListaSendingblue(website_id, session_id, listId){
try{
let crispUsrData = await crisp.getCrispData(website_id, session_id);
let nombreCompleto = crispUsrData['nickname']; // ej: "Lucas Mariano | Rodriguez"
let nombres = nombreCompleto.split("|")[0].slice(0, -1);
......@@ -40,4 +41,7 @@ async function enviarUserAListaSendingblue(website_id, session_id, listId){
console.log(nombres, apellidos, email, phone);
sendinblue.saveContactToList(email, nombres, apellidos, phone, listId);
} catch (e) {
console.log(`Hubo un error al intentar enviar el usuario a la lista de sendinblue. Error: ${e}`);
}
}
\ No newline at end of file
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