You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone, I recently tested the latest version (5.2.0) and when I use the onAnyMessage function, it happens that if the sender or receiver of messages has more than one Whatsapp session (two, three or four), the outgoing/incoming messages will be multiplied by the number of active sessions on the respective phone number.
I want to know if this affected everyone or just me, I would appreciate your opinions.
Maybe I can try to edit the onAnyMessage function to fix this. I think the problem may be occurring in src/lib/wapi/listeners/. But I am not 100% sure about this.
The text was updated successfully, but these errors were encountered:
Thanks @valentinolopezbruno - yes I have been seeing this! I could not figure out why it was happening and I've been filtering duplicate messages in my application code.
If you want to have a go at a fix that would be great 😀
In onAnyMessage function, I was looking at the "logs" of incoming messages and there are no fields that validate a user's session so it forces us to filter duplicate messages by ID. I think the easiest solution is to create an array to store the incoming message IDs and filter to correct duplicates. Then after X amount of time reset the array to free up memory.
What do you think about this @ghayman?
Hi everyone, I recently tested the latest version (5.2.0) and when I use the onAnyMessage function, it happens that if the sender or receiver of messages has more than one Whatsapp session (two, three or four), the outgoing/incoming messages will be multiplied by the number of active sessions on the respective phone number.
I want to know if this affected everyone or just me, I would appreciate your opinions.
Maybe I can try to edit the onAnyMessage function to fix this. I think the problem may be occurring in src/lib/wapi/listeners/. But I am not 100% sure about this.
The text was updated successfully, but these errors were encountered: