tuhinpal / WhatsBot

Modular Userbot for Whatsapp. Supports MultiDevice authentication on non persistent server.
https://tuhinpal.github.io/WhatsBot/
Apache License 2.0
322 stars 403 forks source link

Does not delete for all #13

Closed akshettrj closed 3 years ago

akshettrj commented 3 years ago

Issue: What happens is that you are using client.on("create_message", callback). What this does is, whenever someone sends a message, if before reaching the Whatsapp servers (single tick), if the application recognizes the message, it tries to delete it for everyone msg.delete(true). But if the message has not reached the server yet, it causes the message to be deleted only for the user and not everyone.

Suggestion: Use client.on("message_ack", callback) instead and check if ack === 1

tuhinpal commented 3 years ago

I know this issue, and I don't consider it as an issue, yeah I can check the ack (0 for message deleted everyone, -1 for message deleted only for whatsbot client). But even I verify that also, I still have to give some reply.

I hope you will understand, and yeah I have to watch this repo, somehow I didn't see that issue has been created 😁.

tuhinpal commented 3 years ago

❌ Closing this issue, Feel free to reopen if you want.