diff --git a/apns2/client.py b/apns2/client.py index baacd61..0947350 100644 --- a/apns2/client.py +++ b/apns2/client.py @@ -117,7 +117,11 @@ 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 any([notification.alert, notification.badge, notification.sound]): + elif any([ + notification.alert is not None, + notification.badge is not None, + notification.sound is not None, + ]): inferred_push_type = NotificationType.Alert.value else: inferred_push_type = NotificationType.Background.value