From 8f44ad2c737eee92c742931703eb3daab41a3bd2 Mon Sep 17 00:00:00 2001 From: Ragnar Rebase Date: Sat, 26 Nov 2022 17:51:04 +0200 Subject: [PATCH] Add NotificationType LiveActivity --- apns2/client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apns2/client.py b/apns2/client.py index 0947350..52d6445 100644 --- a/apns2/client.py +++ b/apns2/client.py @@ -26,6 +26,7 @@ class NotificationType(Enum): VoIP = 'voip' Complication = 'complication' FileProvider = 'fileprovider' + LiveActivity = 'liveactivity' MDM = 'mdm' @@ -117,6 +118,8 @@ def send_notification_async(self, token_hex: str, notification: Payload, topic: inferred_push_type = NotificationType.Complication.value elif topic.endswith('.pushkit.fileprovider'): inferred_push_type = NotificationType.FileProvider.value + elif topic.endswith('.push-type.liveactivity'): + inferred_push_type = NotificationType.LiveActivity.value elif any([ notification.alert is not None, notification.badge is not None,