jazzband / django-push-notifications

Send push notifications to mobile devices through GCM or APNS in Django.
MIT License
2.28k stars 618 forks source link

Add Suppport for mutable_content in aioapns #745

Open HashimJVZ opened 3 weeks ago

HashimJVZ commented 3 weeks ago

This PR introduces support for the mutable_content property in the aioapns library, which was previously available only in apns2. The mutable_content property allows notifications to be modified by a Notification Service Extension before being delivered to the user.

This is related to #320 and #350. Earlier support was available in the apns.py file, now added to apns_async.py.

mutable_content parameter is added to the following methods:

It will be then added to the NotificationRequest as

"aps": {
    "alert": alert,
    "badge": badge,
    "sound": sound,
    "thread-id": thread_id,
    **aps_kwargs,
},

Please correct me if I made any misunderstanding. Thanks.