Closed cassidylaidlaw closed 4 years ago
@cassidylaidlaw Thanks for contribution.
Btw, send_notification_async()
/send_notification_batch()
has param push_type
to override this inferring. Dunno why it's not exposed in send_notification()
method, I'll fix it in next release
Thanks for merging!
Without this change, it is impossible to send an empty notification that just sets the app badge to 0 (removes the badge). If notification.badge is 0, then APNsClient.send_notification_async will calculate the push type as
background
, which will not update the badge number. The solution is to comparenotification.badge
explicitly toNone
.