django-instapush icon indicating copy to clipboard operation
django-instapush copied to clipboard

Issue in APNs bulk message

Open Colleoni opened this issue 8 years ago • 1 comments

Hi, I found an issue when sending bulk messages.

In lib/apns.py inside the apns_send_bulk_message function you are cycling over all devices and calling the function _apns_send.

The problem is that _apns_send on line n 123 uses the pop() method to retrieve the notification message:

alert = custom_params.pop('message', '')

and since the message is always stored in the same dictionary, already the second device will receive an empty message.

If you take a look at django-push-notification they simply solved it avoiding the pop method.

Best regards, Luca

Colleoni avatar Dec 05 '16 10:12 Colleoni

@Colleoni Hey, Thanks for reporting the issue. I will have this resolved asap.

amyth avatar Dec 07 '16 06:12 amyth