Skip to content

Commit

Permalink
Fix notif priority (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
Foukki authored Sep 16, 2024
1 parent 7900e40 commit cc1c468
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/utils/communication/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def _send_firebase_push_notification_by_tokens(
# And https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app
androidconfig = messaging.AndroidConfig(priority="high")
apnsconfig = messaging.APNSConfig(
headers={"apns-priority": "5", "apns-push-type": "background"},
headers={"apns-priority": "10", "apns-push-type": "background"},
payload=messaging.APNSPayload(
aps=messaging.Aps(content_available=True),
),
Expand All @@ -117,7 +117,6 @@ async def _send_firebase_push_notification_by_tokens(
"Notification: Unable to send firebase notification to tokens",
)
raise

await self._manage_firebase_batch_response(
response=result,
tokens=tokens,
Expand All @@ -135,7 +134,6 @@ async def _send_firebase_trigger_notification_by_tokens(
without sending the content of the notification.
This is better for privacy and RGPD compliance.
"""

# Push without any data or notification may not be processed by the app in the background.
# We thus need to send a data object with a dummy key to make sure the notification is processed.
# See https://stackoverflow.com/questions/59298850/firebase-messaging-background-message-handler-method-not-called-when-the-app
Expand Down

0 comments on commit cc1c468

Please sign in to comment.