From 1580138a8073cef82cfd784202dadc0a905cb421 Mon Sep 17 00:00:00 2001 From: Joey Orlando Date: Thu, 23 Mar 2023 15:48:52 +0100 Subject: [PATCH] minor bugfix for ios push notifications config (#1614) In the "apns" key of the message sent to FCM, "headers" should not be nested under "payload", it should instead be at the same level. See Firebase docs for the `FirebaseAdmin.Messaging.ApnsConfig` class [here](https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/apns-config#class_firebase_admin_1_1_messaging_1_1_apns_config_1a7a9858f0b30ef7c437205ca01d6e62f6) --- engine/apps/mobile_app/tasks.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engine/apps/mobile_app/tasks.py b/engine/apps/mobile_app/tasks.py index 24658ea4..76d3d32b 100644 --- a/engine/apps/mobile_app/tasks.py +++ b/engine/apps/mobile_app/tasks.py @@ -216,11 +216,11 @@ def _get_fcm_message(alert_group, user, registration_id, critical): "interruption-level": "critical" if critical else "time-sensitive", }, ), - headers={ - # From the docs - # https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message - "apns-priority": "10", - }, ), + headers={ + # From the docs + # https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message + "apns-priority": "10", + }, ), )