wppconnect
wppconnect copied to clipboard
SubscribePresence, onPresenceChanged.....is not working !
Description
SubscribePresenc, onPresenceChanged is not working properly, it is intermittent.
Issues Intermittence when the presence changes, sometimes a while passes and it stops working Flashing when presence changes, it starts working correctly, after a moment it only shows the presence change when I receive a message, which is not correct I have a case on a phone with more than 3000 contacts but it does not show the status change for all of them, only if there is a new contact.
Environment
- **WPPConnect version(s): "@wppconnect-team/wppconnect": "1.28.0",
- Browser: Chrome 116.0.5845.111
- OS: Windows 10
- Node version: 18.12
- **WhatsApp version:**2.2338.12
- MultiDevice (BETA): no
Your Code
const contacts = await client.getAllContacts();
await client.subscribePresence(contacts.map((c) => c.id._serialized));
client.onPresenceChanged(async presenceChangedEvent => {
console.log(presenceChangedEvent)
});