dcai / airnotifier

Push Notifications Server for Human Beings.
Other
602 stars 190 forks source link

fix broadcast for device_type_android and fcm #214

Closed ghost closed 4 years ago

ghost commented 4 years ago

We're using the current master branch and had problems while broadcasting to Android devices. Broadcasts would not be sent to Android devices.

Our Android devices token showed up as "device": "android" and I saw that DEVICE_TYPE_ANDROID was not handled in web.py's send_broadcast.

I modified the condition and made the function async, since the fcm.process has to be awaited.

Now Broadcasting works for Android and iOS devices.

dcai commented 4 years ago

@lkstnr Thank you for contributing :)