-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update bulk with sync result #804 #815
base: master
Are you sure you want to change the base?
Conversation
Makes your constant strings shorter and solves compatibility issues with older PHP versions.
69 huehuehue
One of the fixes for #467
Fix login: Use only version number for WHATSAPP_VER.
Added "OnProfilePictureChanged" Event. Will be fired if one of your contacts changes its profile picture.
Wrong copy past, missing {}.
Some numbers were not identificated as actual users
Changed User-Agent to a newer version
OnProfilePictureChanged Event
Added Event, that will be fired when the user calls: "sendGetGroupsParticipants".
I luv copy paste...
OnGetGroupParticipants Event
Should play nicer with proxies and firewalls
Should help with #485
No more "help I get response tx rx tx rx tx rx rx rx tx tx" No more inner rage for me :-)
Capturing this event can prevent you from talking to a closed connection like a retard
Replaced by new nodeString HTML formatter
Added target user to lastSeen event
Fixes #492
Also fixes #492
Add Send vCard In Broadcast Functionality
Adding Missing "name" Argument To Prevent "Warning: Missing argument 3 for WhatsAppEventListenerProxy::onSendPresence()"
Update WhatsAppEvent.php
Adding Missing "name" Argument To Prevent "Warning: Missing argument 3 for WhatsAppEventListenerProxy::onSendPresence()"
Update whatsprot.class.php
A fix for firePresence. When using the event and want the $type value, it only shows 'unavailable', now returns also 'available'.
firePresence return "unavailable"
Deprecated functions from older file was used. Now its working.
Updated bulk.php
Olala Fixes #777
sendSetProfilePicture supports an url as argument
Now it onMessageComposing and onMessagePaused works.
Fixed typo
FIX: PHP Notice: Use of undefined constant jpg - assumed 'jpg' in /home/abdul/project/whatsapp/WhatsAPI/src/php/whatsprot.class.php on line 2896
I have no idea where this contacts.php removed to
Fix for 'Use of undefined constant jpg'
I see what you did there, but SendSync() is never called so the event handler won't be fired. Also that die(); will stop the program from executing after receiving the sync result and before sending the messages. |
True, ill check that later |
Your best option would be to either put the $wa object in a static property to make it accessible from the event handler, and send the messages from inside the event handler protected static $wa;
protected static $message;
public static function event_onSyncResult($result)
{
foreach($result->existing as $number)
{
$wa->sendMessage(self::$number, self::$message);
}
} or to put the sync result contacts in a static property and set it from the event handler: protected static $numbers = null;
public static function event_onSyncResult($result)
{
self::$numbers = $result->existing;
}
//send sync
$wa->SendSync($numbers);
//wait for response
while(!is_array(self::$numbers) && $wa->pollMessage());
//send
foreach(self::$numbers as $number)
{
$wa->sendMessage($number, $message);
} |
Now bulk.php uses sendSync and only send messages to numbers that exists (have WhatsApp account).
Fixed |
Forget to remove a variable $i. Now everything is ok! :-)
d56e5ea
to
e6cf5a5
Compare
Enhancement #804