WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
4.12k stars 1.38k forks source link

Message Listener error #1023

Open 7thRA-ONE opened 3 months ago

7thRA-ONE commented 3 months ago

Bot responding to old messages that are already executed, with the same media and caption even the message ID is same . It's happening after every 1-4 hrs

W/B Version : 6.7.7 Node : ^20 Npm : 10

DwiRizqiH commented 3 months ago

are you using sock.ev.flush() ? it's very bad if you flush without any condition and flush on every open connection

I also used to try using sock.ev.flush() on every open connection and I noticed, sometimes the message that was received before is received again

remove sock.ev.flush() from the open connection event or give a certain condition

4relial commented 3 months ago

+1

7thRA-ONE commented 3 months ago

are you using sock.ev.flush() ? it's very bad if you flush without any condition and flush on every open connection

I also used to try using sock.ev.flush() on every open connection and I noticed, sometimes the message that was received before is received again

remove sock.ev.flush() from the open connection event or give a certain condition

im not Not using sock.ev.flush()

7thRA-ONE commented 2 months ago

This problem is mostly occuring when switching one account to other in duel accounts. And also when connection is restarted.