This commit is contained in:
2023-02-07 02:12:14 -06:00

10
app.js
View File

@@ -56,9 +56,7 @@ listenMessage = () => client.on('message', async msg => {
// const uv = traeUltimaVisita(from, 's')
// console.log("ultVista=", uv)
if(!isValidNumber(from)){
return
}
if(!isValidNumber(from)){ return }
// Este bug lo reporto Lucas Aldeco Brescia para evitar que se publiquen estados
if (from === 'status@broadcast') { return }
/**
@@ -68,6 +66,12 @@ listenMessage = () => client.on('message', async msg => {
console.log('BlackListed: ',blackList.includes(from.replace("@c.us","")))
return
}
/**
* Blacklist, los telefonos inlcuidos en este arreglo son ignorados por el bot.
*/
console.log('BlackListed: ',blackList.includes(from.replace("@c.us","")))
if (blackList.includes(from.replace("@c.us",""))) return
message = newBody.toLowerCase();
const number = cleanNumber(from)
client.theMsg['numero'] = number