richsage / RMSPushNotificationsBundle

NOT MAINTAINED! ⛔️ Push notifications/messages for mobile devices. Supports iOS, Android (C2DM, GCM), Blackberry and Windows Mobile (toast only). A Symfony2 bundle.
MIT License
321 stars 152 forks source link

Message queue breaks when sending a message with empty setDeviceIdentifier() #118

Open martinsik opened 8 years ago

martinsik commented 8 years ago

It seems like the message queue stops sending messages when you try to send a message with empty device identifier:

$pushNotifications = $this->container->get('rms_push_notifications');

$devices = ['abc', null, 'xyz'];
foreaach ($devices as $di) {
    $iosMessage = new iOSMessage();
    $iosMessage->setMessage('message');
    $iosMessage->setAPSSound('default');
    $iosMessage->setAPSBadge(1);

    $iosMessage->setDeviceIdentifier($di);
    $pushNotifications->send($iosMessage);
}

The first device xyz will receive a notification while xyz won't.

TheFox commented 8 years ago

foreaach with two a.