venomous0x / WhatsAPI

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

Documentation for methods #618

Open CodersBrothers opened 10 years ago

CodersBrothers commented 10 years ago

I saw in your forked repo (https://github.com/shirioko/WhatsAPI/blob/master/src/php/bulk.php) that the login method have 2 more things:

$this->wa->sendClientConfig();
$this->wa->sendGetServerProperties();

Are necesaries for not block account? I never use in one week and my account its OK.

sendClientConfig not have docu that explain what are doing at underground.

(Where is the contacts file version? xDDD)

shirioko commented 10 years ago

sendClientConfig sends device capabilities (taken from WP client) https://github.com/venomous0x/WhatsAPI/blob/master/src/php/whatsprot.class.php#L603

and sendGetServerProperties gets the server properties (doh) e.g. max. group size, max file size, max image dimensions, socket timeout etc.

This is indeed a measure to try to prevent number blocking

And please don't discuss here what I'm doing on my own fork, those are two separate projects until I push my changes to this repository. :)

CodersBrothers commented 10 years ago

ok, so i will add to my code. Im trying have a 24/7 connected bot. By the moment its 30 hours online Sorry for comment this here :P Thanks.