Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
push_notifications: Fix APNs message generation.
Anders Kaseorg7ccefa524222
diff --git a/zerver/lib/push_notifications.py b/zerver/lib/push_notifications.pyindex 6ccb6ca4d35..19ed8071d80 100644--- a/zerver/lib/push_notifications.py+++ b/zerver/lib/push_notifications.py@@ -156,7 +156,8 @@ def send_apple_push_notification(DeviceTokenClass = PushDeviceTokenlogger.info("APNs: Sending notification for user %d to %d devices", user_id, len(devices))- message = {"aps": modernize_apns_payload(payload_data)}+ payload_data = modernize_apns_payload(payload_data).copy()+ message = {**payload_data.pop("custom", {}), "aps": payload_data}retries_left = APNS_MAX_RETRIESfor device in devices:# TODO obviously this should be made to actually use the async