venomous0x / WhatsAPI

Interface to WhatsApp Messenger
2.59k stars 2.14k forks source link

Whatsapp Client Sync #1183

Open ricardoperovano opened 8 years ago

ricardoperovano commented 8 years ago

Well, I have read some issues in the wiki but them doesn't answer my question. I read on wiki that i can only sync once per hour, but how does the whatsapp client deal if I add 3 new contacts and send messages for them ? Will it send sync 3 times or i can sync once per hour and per contact ?

Thanks in adance!

kirilydk commented 8 years ago

You can sync up an array with around 10.000 contacts, when you go beyond 15.000 in one sync it failed getting all the numbers. With those 10.000 contacts it takes around 30-40 seconds to process.

Anyways, there are different modes of SendSync:

First Sync (Registration) - First time you sync $myContacts = array('123456789', '987654321'); $w->sendSync($myContacts, null, 0);

Delta Sync (Addind contacts) - Next times you sync (it adds users incrementally) $newContact = '123456789'; $w->sendSync($newContact);