wa-js
wa-js copied to clipboard
Response time of the function WPP.contact.queryExists('[number]@c.us');
WA-JS Version
v3.0.1
WhatsApp Version
2.3000.x
Browser Version
Chrome Version 122.0.6261.131
Operation System
Windows 11
Steps to reproduce
To reproduce this situation, it is important to have a profile with many open conversations
1 - After opening the profile page, access the settings and check the synchronization progress of conversations in the background!
2 - While conversations are still starting to synchronize, paste WA_JS into the console and execute the following function: await WPP.contact.queryExists('[number]@c.us');
What is expected?
Get an immediate answer about number verification!
What is actually happening?
The await function WPP.contact.queryExists('[number]@c.us'); You are waiting for the conversation synchronization process to come to an end, and only then will you receive a response about verifying the existence of the number, making the process much longer!
Any additional comments?
No response
this is not an issue with this library. sometimes response from WhatsApp takes too long. try to reset your internet connection or keep your mobile WhatsApp active
Did you follow the steps described and have no problems? Because all my clients couldn't use this function, while I hadn't finished the sync of the conversations! And I already showed it to the responsible that this only happens while in sync!
Facing same issue what is the solution?
There is a way to make this faster; however, I believe the risk of being banned will increase. I've only skimmed through the function so far. Throughout this week, I'll study it a bit more and see how I can take the necessary precautions to see if it's possible to implement it without waiting for synchronization.
There is a way to make this faster;
What is the way?
Please, test this branch:
https://github.com/wppconnect-team/wa-js/tree/isOnWhatsApp
I created a function for test porpouse, try:
await WPP.contact.isOnWhatsapp(number);
Don't focus on bugs at the moment, the idea of this branch is just to test if it works in synchronization, then I'll focus more calmly on bugs and future issues that may arise, the point there is just to return while synchronizing.