diff --git a/adapter/index.js b/adapter/index.js index 07b4049..97168b6 100644 --- a/adapter/index.js +++ b/adapter/index.js @@ -190,6 +190,7 @@ module.exports = { get, reply, getIA, saveMessage, remplazos, stepsInitial } //M * Reemplaza texto en la respuesta con variables predefinidas. */ function remplazos(elTexto, extraInfo){ + if(elTexto == null){elTexto = '';} laLista = elTexto.toString().split(' '); // console.log(laLista); // console.log('============= remplazos ============'); @@ -289,24 +290,18 @@ function remplazos(elTexto, extraInfo){ // return histlMsjs; } if (laLista[i].search('%nombre%')>-1){//Remplaza con el nombre del remitente. - console.log(extraInfo); - if(typeof extraInfo !== undefined){ - console.log(1) - if(extraInfo['_data']['notifyName'] !== undefined){ - console.log(2) - elTexto = elTexto.toString().replace('%nombre%', extraInfo['_data']['notifyName']); - console.log("notifyName"); + const {theMsg} = extraInfo; + if(theMsg['_data']['notifyName'] !== undefined){ + elTexto = elTexto.toString().replace('%nombre%', theMsg['_data']['notifyName']); } } } if (laLista[i].search('%primer_nombre%')>-1){//Remplaza con el nombre del remitente. - // console.log(extraInfo); if(typeof extraInfo !== undefined){ - if(extraInfo['_data']['notifyName'] !== undefined){ - var elNombre = extraInfo['_data']['notifyName'] - elTexto = elTexto.toString().replace('%primer_nombre%', elNombre.split(' ')[0]); - // console.log("notifyName"); + const {theMsg} = extraInfo; + if(theMsg['_data']['notifyName'] !== undefined){ + elTexto = elTexto.toString().replace('%primer_nombre%', theMsg['_data']['notifyName'].split(' ')[0]); } } } diff --git a/app.js b/app.js index 4c9ce31..dd6c559 100644 --- a/app.js +++ b/app.js @@ -15,11 +15,12 @@ const { generateImage, cleanNumber, checkEnvFile, createClient, isValidNumber } const { connectionReady, connectionLost } = require('./controllers/connection') const { saveMedia } = require('./controllers/save') const { getMessages, responseMessages, bothResponse } = require('./controllers/flows') -const { sendMedia, sendMessage, lastTrigger, sendMessageButton, readChat } = require('./controllers/send'); +const { sendMedia, sendMessage, lastTrigger, sendMessageButton, sendMessageList, readChat } = require('./controllers/send'); const { remplazos, stepsInitial} = require('./adapter/index');//MOD by CHV - Agregamos para utilizar remplazos y stepsInitial const { isUndefined } = require('util'); const { isSet } = require('util/types'); const { Console } = require('console'); +const { ClientRequest } = require('http'); const app = express(); app.use(cors()) app.use(express.json()) @@ -42,6 +43,11 @@ const listenMessage = () => client.on('message', async msg => { // console.log("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); console.log("+++++++++++++++++++++++++++++++++++++ INICIO +++++++++++++++++++++++++++++++++++++++"); // console.log("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); + + client.theMsg = msg; + + + console.log("HORA:"+new Date().toLocaleTimeString()+" FROM:"+from+", BODY:"+body+", HASMEDIA:"+hasMedia); newBody = removeDiacritics(body) //MOD by CHV - Agregamos para quitar acentos // newBody = remplazos(newBody); @@ -81,8 +87,36 @@ const listenMessage = () => client.on('message', async msg => { return } - var tempBody = body.toString().toLowerCase(); - + if(body=='/listas'){ + const productList = new List( + "Here's our list of products at 50% off", + "View all products", + [ + { + title: "Products list", + rows: [ + { id: "apple", title: "Apple" }, + { id: "mango", title: "Mango" }, + { id: "banana", title: "Banana" }, + ], + }, + ], + "Please select a product" + ); + console.log('##################################################################################################') + // console.log(from, lista) + // let sections = [{title:'sectionTitle',rows:[{id:'ListItem1', title: 'title1'},{id:'ListItem2', title:'title2'}]}]; + // let lista = new List('List body','btnText',sections,'Title','footer'); + console.log("****************** productList ******************") + console.log(productList) + client.sendMessage(from, productList); //cliente.sendMessage recibe el arreglo SIN nombres (solo las secciones los necesitan) + // client.sendMessage('5215527049036@c.us', productList); + // client.sendMessage('5215554192439@c.us', productList); + // await sendMessageList(client, '5215545815654@c.us', null, lista); //sendMessageList recibe el arreglo CON nombres, como viene del response.json + // await sendMessageList(client, '5215527049036@c.us', null, lista); + // await sendMessageList(client, '5215554192439@c.us', null, lista); + // client.sendMessage(from, lista); + } /** * PRUEBA BOTONES NUEVOS @@ -122,7 +156,7 @@ const listenMessage = () => client.on('message', async msg => { // console.log("HAY URL?? : "+nuevaRespuesta.search("/URL")); var resps = require('./flow/response.json'); - nuevaRespuesta = remplazos(resps[step].replyMessage.join(''), msg); + nuevaRespuesta = remplazos(resps[step].replyMessage.join(''), client); var pasoRequerido = resps[step].pasoRequerido; // var hayRequest = false; // if(hayRequest==false && nuevaRespuesta.search("/URL")>-1){console.log("Paramos flujo para que no mande el mensaje '/URL'."); return;}//Si el trigger es desbloqueo ya no hace nada mas. @@ -130,16 +164,6 @@ const listenMessage = () => client.on('message', async msg => { /** * Si quieres enviar botones */ - if (response.delay){ - // console.log("+++++++++++++++++++ SENDING MSG WITH DELAY ("+response.delay+") +++++++++++++++++"); - setTimeout(() => { - sendMessage(client, from, nuevaRespuesta, response.trigger, step); - // console.log(" ************* Msg with delay SENT ****************") - }, response.delay) - } - else{ - await sendMessage(client, from, nuevaRespuesta, response.trigger, step); - } if (!response.delay && response.media) { // console.log("++++++++++++++++++++++++++++ SEND MEDIA NO DELAY +++++++++++++++++++++++++++++++++++"); sendMedia(client, from, response.media, response.trigger); @@ -150,11 +174,28 @@ const listenMessage = () => client.on('message', async msg => { sendMedia(client, from, response.media, response.trigger); }, response.delay) } + if (response.delay){ + // console.log("+++++++++++++++++++ SENDING MSG WITH DELAY ("+response.delay+") +++++++++++++++++"); + setTimeout(() => { + sendMessage(client, from, nuevaRespuesta, response.trigger, step); + // console.log(" ************* Msg with delay SENT ****************") + }, response.delay) + } + else{ + await sendMessage(client, from, nuevaRespuesta, response.trigger, step); + } if(response.hasOwnProperty('actions')){ const { actions } = response; - // console.log("++++++++++++++++++++++++++++ SEND MESG BUTTON +++++++++++++++++++++++++++++++++++"); - await sendMessageButton(client, from, null, actions); - // return + // console.log("++++++++++++++++++++++++++++ SEND MESG BUTTON/LIST +++++++++++++++++++++++++++++++++++"); + if(actions['sections'] === undefined){ //Botones + console.log("Botones") + await sendMessageButton(client, from, null, actions); + } + else{ //Listas + console.log("Listas") + // console.log(actions) + await sendMessageList(client, from, null, actions); + } } return } @@ -162,7 +203,7 @@ const listenMessage = () => client.on('message', async msg => { * Regresa el mensaje enviado, con los remplazos procesados. */ if(message.search('/rpt') > -1){ - newBody = remplazos(newBody); + newBody = remplazos(newBody, client); newBody = newBody.replace("/rpt ", ""); client.sendMessage(from, newBody); return @@ -198,7 +239,7 @@ const listenMessage = () => client.on('message', async msg => { var elTextoDelMensaje = caritas + " *" + saludo + "amigo tendero* ❗❗👋🏻\n🕊️ *GUNA* trae para ti dinámicas digitales, con las que podrás participar para ganar increíbles premios. 🏆💸💰\nSigue los siguientes pasos: 😃\n*1.* 📲Sigue la página de Yo Soy Guna en Facebook en la siguiente liga ➡️ https://www.facebook.com/yosoyguna\n*2.* 👉🏻Es importante des click en el botón Me Gusta 👍\n*3.* 🧐Sigue la dinámica que publicaremos , subiendo tu foto 📸 con los siguientes #yosoyguna #gunatenderos #gunachampions\n*4.* 🥳🎉En esta misma página , podrás ver publicados los ganadores🏅 y el tiempo en que serán elegidos. 💲 Además de tener acceso a increíbles promociones 🤑"; sendMedia(client, masivo[i].numero+"@c.us", "envioMasivoGuna.jpg"); await sleep(500); - client.sendMessage(masivo[i].numero+"@c.us", remplazos(elTextoDelMensaje)); + client.sendMessage(masivo[i].numero+"@c.us", remplazos(elTextoDelMensaje, client)); // client.sendMessage(masivo[i].numero+"@c.us", "Este es un mensaje de prueba para *"+masivo[i].numero+"*, HORA:*"+new Date().toLocaleTimeString()+"*"); console.log(`Esperamos ${rnd} segundos...`); await sleep(rnd*1000); @@ -214,7 +255,6 @@ const listenMessage = () => client.on('message', async msg => { return Math.floor(Math.random() * (max - min) + min); // The maximum is exclusive and the minimum is inclusive } - //Si quieres tener un mensaje por defecto if (process.env.DEFAULT_MESSAGE === 'true') { const response = await responseMessages('DEFAULT') @@ -224,7 +264,14 @@ const listenMessage = () => client.on('message', async msg => { */ if(response.hasOwnProperty('actions')){ const { actions } = response; - await sendMessageButton(client, from, null, actions); + if(actions['sections'] === undefined){ //Botones + console.log("Botones") + await sendMessageButton(client, from, null, actions); + } + else{ //Listas + console.log("Listas") + await sendMessageList(client, from, null, actions); + } } return } diff --git a/controllers/handle.js b/controllers/handle.js index 7b9e31a..84a8d40 100644 --- a/controllers/handle.js +++ b/controllers/handle.js @@ -47,7 +47,7 @@ const generateImage = (base64, cb = () => {}) => { let qr_svg = qr.image(base64, { type: 'svg', margin: 4 }); qr_svg.pipe(require('fs').createWriteStream('./mediaSend/qr-code.svg')); console.log(`⚡ Recuerda que el QR se actualiza cada minuto ⚡'`); - console.log(`⚡ Actualiza F5 el navegador para mantener el mejor QR⚡`); + console.log(`⚡ Actualiza F5 el navegador para ver el QR mas reciente⚡`); cb() } diff --git a/controllers/send.js b/controllers/send.js index 7e25ec8..45ca85d 100644 --- a/controllers/send.js +++ b/controllers/send.js @@ -2,7 +2,7 @@ const ExcelJS = require('exceljs'); const moment = require('moment'); const fs = require('fs'); -const { MessageMedia, Buttons } = require('whatsapp-web.js'); +const { MessageMedia, Buttons, List } = require('whatsapp-web.js'); const { cleanNumber } = require('./handle') const { remplazos } = require('../adapter/index'); //MOD by CHV - Agregamos remplazos const DELAY_TIME = 170; //ms @@ -58,12 +58,10 @@ const sendMedia = (client, number = null, fileName = null, trigger = null) => { * Enviamos un mensaje simple (texto) a nuestro cliente * @param {*} number */ -const sendMessage = async (client, number = null, text = null, trigger = null, regla) => { //MOD by CHV - Agregamos el parametro "regla" para guardarlo en "chats/nuero.json" - // console.log("SENDMESSAGE (send.js) & regla = " + regla) +const sendMessage = async (client, number = null, text = null, trigger = null, regla) => { //MOD by CHV - Agregamos el parametro "regla" para guardarlo en "chats/numero.json" setTimeout(async () => { number = cleanNumber(number) const message = text - // console.log("number="+number); client.sendMessage(number, message); await readChat(number, message, trigger, regla) //MOD by CHV - Agregamos el parametro "regla" console.log(`⚡⚡⚡ Enviando mensajes....`); @@ -76,18 +74,33 @@ const sendMessage = async (client, number = null, text = null, trigger = null, r * @param {*} number */ const sendMessageButton = async (client, number = null, text = null, actionButtons) => { - number = cleanNumber(number) - const { title = null, message = null, footer = null, buttons = [] } = actionButtons; - let button = new Buttons(remplazos(message),[...buttons], title, footer); - // console.log("number="+number); - client.sendMessage(number, button); - - console.log(`⚡⚡⚡ Enviando mensajes....`); - console.log("sendMessageButton."); - // console.log("Trigger="+trigger); + setTimeout(async () => { + number = cleanNumber(number) + const { title = null, message = null, footer = null, buttons = [] } = actionButtons; + let button = new Buttons(remplazos(message, client),[...buttons], remplazos(title, client), remplazos(footer, client)); + client.sendMessage(number, button); + console.log(`⚡⚡⚡ Enviando mensajes (botones)....`); + // console.log("sendMessageButton."); + }, DELAY_TIME) // console.log("************************ SEND MESSAGE BUTTON ***********************************"); } +/** + * Enviamos listas (con el formato de response.json) + * @param {*} number + */ +const sendMessageList = async (client, number = null, text = null, actionList) => { + setTimeout(async () => { + // console.log("********************** client **************************") + // console.log(client) + number = cleanNumber(number) + const { body = null, buttonText = null, sections = [], title = null, footer = null } = actionList; + let aList = new List( remplazos(body, client),remplazos(buttonText, client),[...sections],remplazos(title, client),remplazos(footer, client)); + client.sendMessage(number, aList); + await readChat(number, message, actionList) + console.log('⚡⚡⚡ Enviando lista a '+number+' ....'); + }, DELAY_TIME) +} /** * Opte @@ -121,4 +134,4 @@ const readChat = async (number, message, trigger = null, regla) => { //MOD by CH // console.log('Saved') } -module.exports = { sendMessage, sendMedia, lastTrigger, sendMessageButton, readChat, sendMediaVoiceNote } +module.exports = { sendMessage, sendMedia, lastTrigger, sendMessageButton, sendMessageList, readChat, sendMediaVoiceNote } diff --git a/flow/initial.json b/flow/initial.json index a6b2017..50e346b 100644 --- a/flow/initial.json +++ b/flow/initial.json @@ -42,5 +42,37 @@ { "keywords": ["rnd2"], "key": "rnd2" + }, + { + "keywords": ["4"], + "key": "lista" + }, + { + "keywords": ["5"], + "key": "botones" + }, + { + "keywords": ["cursos"], + "key": "cursos" + }, + { + "keywords": ["youtube"], + "key": "youtube" + }, + { + "keywords": ["telegram"], + "key": "telegram" + }, + { + "keywords": ["manzana"], + "key": "manzana" + }, + { + "keywords": ["mango"], + "key": "mango" + }, + { + "keywords": ["platano"], + "key": "platano" } ] \ No newline at end of file diff --git a/flow/response.json b/flow/response.json index a5b8dee..9147ab3 100644 --- a/flow/response.json +++ b/flow/response.json @@ -16,7 +16,9 @@ "%saludo% %primer_nombre%, este es el menú, selecciona una opción: \n", "Pon *1* para mensajes anteriores.\n", "Pon *2* para ver remplazos.\n", - "Pon *3* para pedir nombre (RegExp).\n" + "Pon *3* para pedir nombre (RegExp).\n", + "Pon *4* para un ejemplo de listas.\n", + "Pon *5* para un ejemplo de botones.\n" ], "media":null, "trigger":null @@ -108,5 +110,83 @@ {"body":"Telegram"} ] } + }, + "lista":{ + "replyMessage":[ + "*%saludo%*, este es un ejemplo de listas" + ], + "media":null, + "trigger":null, + "actions":{ + "body":"Hola *%primer_nombre%*, aqui está nuestra lista de productos al 50% de descuento,\n\nAutomáticamente el flujo se regresa al *menú*, asi que puedes poner nuevamente un número del 1 al 5 sin necesidad de volver a iniciar con */menu*.", + "buttonText":"Ver todos los productos", + "sections": [ + {"title":"Lista de productos", + "rows":[ + {"id": "manzana", "title": "manzana"}, + {"id": "mango", "title": "mango"}, + {"id": "platano", "title": "platano"} + ] + } + ], + "title":"Por favor selecciona un producto" + }, + "pasoRequerido":"menu", + "goto":"menu" + }, + "botones":{ + "replyMessage":[ + "*%saludo%*, este es un ejemplo de botones" + ], + "media":"https://media2.giphy.com/media/VQJu0IeULuAmCwf5SL/giphy.gif", + "trigger":null, + "actions":{ + "title":"¿Que te interesa ver %primer_nombre%?", + "message":"Recuerda todo este contenido es gratis y estaria genial que me sigas!", + "footer":"Automáticamente el flujo se regresa al *menú*, asi que puedes poner nuevamente un número del 1 al 5 sin necesidad de volver a iniciar con */menu*.", + "buttons":[ + {"body":"Cursos"}, + {"body":"Youtube"}, + {"body":"Telegram"} + ] + }, + "pasoRequerido":"menu", + "goto":"menu" + }, + "cursos":{ + "replyMessage":["*%saludo% %primer_nombre%*, seleccionaste *Cursos*\n\n","Automáticamente el flujo se regresa al *menú*, asi que puedes poner nuevamente un número del 1 al 5 sin necesidad de volver a iniciar con */menu*."], + "trigger":null, + "pasoRequerido":"menu", + "goto":"menu" + }, + "youtube":{ + "replyMessage":["*%saludo% %primer_nombre%*, seleccionaste *YouTube*\n\n","Automáticamente el flujo se regresa al *menú*, asi que puedes poner nuevamente un número del 1 al 5 sin necesidad de volver a iniciar con */menu*."], + "trigger":null, + "pasoRequerido":"menu", + "goto":"menu" + }, + "telegram":{ + "replyMessage":["*%saludo% %primer_nombre%*, seleccionaste *Telegram*\n\n","Automáticamente el flujo se regresa al *menú*, asi que puedes poner nuevamente un número del 1 al 5 sin necesidad de volver a iniciar con */menu*."], + "trigger":null, + "pasoRequerido":"menu", + "goto":"menu" + }, + "manzana":{ + "replyMessage":["*%saludo% %primer_nombre%*, seleccionaste *manzana*\n\n","Automáticamente el flujo se regresa al *menú*, asi que puedes poner nuevamente un número del 1 al 5 sin necesidad de volver a iniciar con */menu*."], + "trigger":null, + "pasoRequerido":"menu", + "goto":"menu" + }, + "mango":{ + "replyMessage":["*%saludo% %primer_nombre%*, seleccionaste *mango*\n\n","Automáticamente el flujo se regresa al *menú*, asi que puedes poner nuevamente un número del 1 al 5 sin necesidad de volver a iniciar con */menu*."], + "trigger":null, + "pasoRequerido":"menu", + "goto":"menu" + }, + "platano":{ + "replyMessage":["*%saludo% %primer_nombre%*, seleccionaste *platano*\n\n","Automáticamente el flujo se regresa al *menú*, asi que puedes poner nuevamente un número del 1 al 5 sin necesidad de volver a iniciar con */menu*."], + "trigger":null, + "pasoRequerido":"menu", + "goto":"menu" } } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 87282dc..35bab7f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "qrcode-terminal": "^0.12.0", "socket.io": "^4.5.1", "stormdb": "^0.6.0", - "whatsapp-web.js": "^1.18.4", + "whatsapp-web.js": "github:pedroslopez/whatsapp-web.js#fix-buttons-list", "xlsx": "^0.18.5" }, "devDependencies": { @@ -36,9 +36,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz", - "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz", + "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==", "bin": { "parser": "bin/babel-parser.js" }, @@ -74,9 +74,9 @@ } }, "node_modules/@google-cloud/dialogflow": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@google-cloud/dialogflow/-/dialogflow-5.3.0.tgz", - "integrity": "sha512-nzDma93H+6rVPLCLJ+mH4PcuqVz3Ry/hf2aV+PERBra/Qt+wzjndnCZILgCu1EMxCb+XBW94XddcckdJ+7VFAQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@google-cloud/dialogflow/-/dialogflow-5.4.0.tgz", + "integrity": "sha512-2MBt4sOSgLKPubQEYW0YH9OcBx89SUUEUFfBA+vK1NH8tkjBIBvVqSXLPlXLCLZ2jRhTHSkncQO5MzAhrS4rhA==", "dependencies": { "google-gax": "^3.5.2" }, @@ -538,9 +538,9 @@ "integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==" }, "node_modules/@types/node": { - "version": "14.18.34", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.34.tgz", - "integrity": "sha512-hcU9AIQVHmPnmjRK+XUUYlILlr9pQrsqSrwov/JK1pnf3GTQowVBhx54FbvM0AU/VXGH4i3+vgXS5EguR7fysA==" + "version": "14.18.35", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.35.tgz", + "integrity": "sha512-2ATO8pfhG1kDvw4Lc4C0GXIMSQFFJBCo/R1fSgTwmUlq5oy95LXyjDQinsRVgQY6gp6ghh3H91wk9ES5/5C+Tw==" }, "node_modules/@types/yauzl": { "version": "2.10.0", @@ -2984,18 +2984,18 @@ } }, "node_modules/markdown-it-anchor": { - "version": "8.6.5", - "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.5.tgz", - "integrity": "sha512-PI1qEHHkTNWT+X6Ip9w+paonfIQ+QZP9sCeMYi47oqhH+EsW8CrJ8J7CzV19QVOj6il8ATGbK2nTECj22ZHGvQ==", + "version": "8.6.6", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.6.tgz", + "integrity": "sha512-jRW30YGywD2ESXDc+l17AiritL0uVaSnWsb26f+68qaW9zgbIIr1f4v2Nsvc0+s0Z2N3uX6t/yAw7BwCQ1wMsA==", "peerDependencies": { "@types/markdown-it": "*", "markdown-it": "*" } }, "node_modules/marked": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.2.4.tgz", - "integrity": "sha512-Wcc9ikX7Q5E4BYDPvh1C6QNSxrjC9tBgz+A/vAhp59KXUgachw++uMvMKiSW8oA85nopmPZcEvBoex/YLMsiyA==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.2.5.tgz", + "integrity": "sha512-jPueVhumq7idETHkb203WDD4fMA3yV9emQ5vLwop58lu8bTclMghBWcYAavlDqIEMaisADinV1TooIFCfqOsYQ==", "bin": { "marked": "bin/marked.js" }, @@ -3895,9 +3895,9 @@ } }, "node_modules/protobufjs-cli/node_modules/minimatch": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz", - "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -4164,9 +4164,9 @@ } }, "node_modules/readdir-glob/node_modules/minimatch": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz", - "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -4743,9 +4743,9 @@ } }, "node_modules/systeminformation": { - "version": "5.16.6", - "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.16.6.tgz", - "integrity": "sha512-FLljCM7UmCVnilpQvX9b1SptMjuxPrtlqqSsFPI/3nQ19ZDJSalpph/9K707y5N6gT1loJwG42j+xVhX0RwuFw==", + "version": "5.16.9", + "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.16.9.tgz", + "integrity": "sha512-QTlv3GGSromPeLVW3pzM6uxU8RbkacW9e0+ZX23GAXaX+XE0UToSygAxCJDHSty6RB9lAFHCHg+FfiXFChi/+w==", "dev": true, "optional": true, "os": [ @@ -5085,8 +5085,8 @@ }, "node_modules/whatsapp-web.js": { "version": "1.18.4", - "resolved": "https://registry.npmjs.org/whatsapp-web.js/-/whatsapp-web.js-1.18.4.tgz", - "integrity": "sha512-Dqu6Q37tDDAcVJ44aMdRE76sI/9rBCUG+NTz1Kxh2w4obX2WtpoRetilxqgx1r4+pFUl58Lf21wGOEwPZ1pT/A==", + "resolved": "git+ssh://git@github.com/pedroslopez/whatsapp-web.js.git#d1b2df9051bcfca3a1eb0c4b73f45f3ef6be784b", + "license": "Apache-2.0", "dependencies": { "@pedroslopez/moduleraid": "^5.0.2", "fluent-ffmpeg": "^2.1.2", diff --git a/package.json b/package.json index 8bb4231..17d682d 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "qrcode-terminal": "^0.12.0", "socket.io": "^4.5.1", "stormdb": "^0.6.0", - "whatsapp-web.js": "^1.18.4", + "whatsapp-web.js": "github:pedroslopez/whatsapp-web.js#fix-buttons-list", "xlsx": "^0.18.5" }, "devDependencies": {