amyth / django-instapush

Django push notifications app that handles both GCM and APNS notifications. This app also supports mongoDB models (mongoengine).
http://www.techstricks.com
MIT License
15 stars 4 forks source link

Issue in APNs bulk message #4

Open Colleoni opened 8 years ago

Colleoni commented 8 years ago

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

amyth commented 7 years ago

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