Actualizar server.js
This commit is contained in:
@@ -4533,7 +4533,7 @@ app.post("/webhook/evolution", async (req, res) => {
|
||||
const lastMsg = checkHumanQ.rows[0];
|
||||
const diffMinutos = (Date.now() - new Date(lastMsg.created_at).getTime()) / (1000 * 60);
|
||||
|
||||
if (diffMinutos < 120) {
|
||||
if (diffMinutos < 0) {
|
||||
console.log(`🛡️ [ESCUDO IA] Silenciada porque un humano habló hace ${Math.round(diffMinutos)} minutos.`);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user