Always use "conserve power" priority for challenge notifications
This commit is contained in:
parent
42a47406cc
commit
ff7a5f471b
|
@ -121,8 +121,12 @@ public class APNSender implements Managed, PushNotificationSender {
|
||||||
pushType = notification.urgent() ? PushType.ALERT : PushType.BACKGROUND;
|
pushType = notification.urgent() ? PushType.ALERT : PushType.BACKGROUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
final DeliveryPriority deliveryPriority =
|
final DeliveryPriority deliveryPriority = switch (notification.notificationType()) {
|
||||||
(notification.urgent() || isVoip) ? DeliveryPriority.IMMEDIATE : DeliveryPriority.CONSERVE_POWER;
|
case NOTIFICATION ->
|
||||||
|
(notification.urgent() || isVoip) ? DeliveryPriority.IMMEDIATE : DeliveryPriority.CONSERVE_POWER;
|
||||||
|
case ATTEMPT_LOGIN_NOTIFICATION_HIGH_PRIORITY -> DeliveryPriority.IMMEDIATE;
|
||||||
|
case CHALLENGE, RATE_LIMIT_CHALLENGE -> DeliveryPriority.CONSERVE_POWER;
|
||||||
|
};
|
||||||
|
|
||||||
final String collapseId =
|
final String collapseId =
|
||||||
(notification.notificationType() == PushNotification.NotificationType.NOTIFICATION && notification.urgent() && !isVoip)
|
(notification.notificationType() == PushNotification.NotificationType.NOTIFICATION && notification.urgent() && !isVoip)
|
||||||
|
|
Loading…
Reference in New Issue