PyAPNs2 icon indicating copy to clipboard operation
PyAPNs2 copied to clipboard

Feature[alert]: add interruption-level support in the aps payload

Open GonzaloAvilez opened this issue 1 year ago • 1 comments

Based on apple docs

https://developer.apple.com/documentation/usernotifications/unmutablenotificationcontent/interruptionlevel image

GOAL: Adding interruption-level key nested in aps

Proposal Behavior:

  1. Default value for interruption_level is None to not impact in current alert behavior.
  2. There is a validation in PayloadAlert class to restrict interruption_level argument only the values defined in Apple docs using by typping.Literal and the setter decorator for the mentioned argument.

Extra NOTES:

This effort is required to support other libraries such as django push notifications issue:-> https://github.com/jazzband/django-push-notifications/issues/708

GonzaloAvilez avatar Sep 07 '24 01:09 GonzaloAvilez

Open issue related -> https://github.com/Pr0Ger/PyAPNs2/issues/158

GonzaloAvilez avatar Sep 07 '24 01:09 GonzaloAvilez