Closed danielmorrison closed 3 years ago
Hi, I have an issue where I'm setting content-available to 1 but the notification isn't getting set to 'apns-push-type`background due to having a custom payload.
content-available
1
`background
The code (introduced in #85) checks for aps.count which is the problem here:
aps.count
https://github.com/ostinelli/apnotic/blob/36a2e36e0b89c5aec627226c83c7955f68f0b3f5/lib/apnotic/notification.rb#L8-L10
I didn't understand why at first, but the test here makes me think this was to ensure we weren't also setting notification.alert.
notification.alert
https://github.com/ostinelli/apnotic/blob/36a2e36e0b89c5aec627226c83c7955f68f0b3f5/spec/apnotic/notification_spec.rb#L173-L180
This seems wrong, as I want to send a background notification with custom data. Is there an intent I'm missing here? Another "gotcha"?
I'm happy to write up a PR with a proposed fix.
This is addressed in #91.
Hi, I have an issue where I'm setting
content-available
to1
but the notification isn't getting set to 'apns-push-type`background
due to having a custom payload.The code (introduced in #85) checks for
aps.count
which is the problem here:https://github.com/ostinelli/apnotic/blob/36a2e36e0b89c5aec627226c83c7955f68f0b3f5/lib/apnotic/notification.rb#L8-L10
I didn't understand why at first, but the test here makes me think this was to ensure we weren't also setting
notification.alert
.https://github.com/ostinelli/apnotic/blob/36a2e36e0b89c5aec627226c83c7955f68f0b3f5/spec/apnotic/notification_spec.rb#L173-L180
This seems wrong, as I want to send a background notification with custom data. Is there an intent I'm missing here? Another "gotcha"?
I'm happy to write up a PR with a proposed fix.