Skip to content

Commit 16d43c2

Browse files
authored
Make mutable-content int (1) instead of bool (True) (#763)
APNS expect as int in the payload. Setting `mutable_content` to True, will set `mutable-content` to 1.
1 parent cca865a commit 16d43c2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

push_notifications/apns_async.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def apns_send_message(
239239
:param alert: The alert message to send
240240
:param application_id: The application_id to use
241241
:param creds: The credentials to use
242-
:param mutable_content: If True, enables the "mutable-content" flag in the payload.
242+
:param mutable_content: If True, the "mutable-content" flag will be set to 1.
243243
This allows the app's Notification Service Extension to modify
244244
the notification before it is displayed.
245245
:param category: The category identifier for actionable notifications.
@@ -306,7 +306,7 @@ def apns_send_bulk_message(
306306
:param alert: The alert message to send
307307
:param application_id: The application_id to use
308308
:param creds: The credentials to use
309-
:param mutable_content: If True, enables the "mutable-content" flag in the payload.
309+
:param mutable_content: If True, the "mutable-content" flag will be set to 1.
310310
This allows the app's Notification Service Extension to modify
311311
the notification before it is displayed.
312312
:param category: The category identifier for actionable notifications.
@@ -397,10 +397,9 @@ async def _send_bulk_request(
397397

398398
aps_kwargs = {}
399399
if mutable_content:
400-
aps_kwargs["mutable-content"] = mutable_content
400+
aps_kwargs["mutable-content"] = 1
401401
if category:
402402
aps_kwargs["category"] = category
403-
404403
if content_available:
405404
aps_kwargs["content-available"] = 1
406405

0 commit comments

Comments
 (0)