Discard APNs tokens if the APNs server reports that the token is expired

This commit is contained in:
Jon Chambers
2024-07-08 13:12:26 -04:00
committed by Jon Chambers
parent 775889c0b6
commit 02b9ceb4c7
2 changed files with 6 additions and 5 deletions

View File

@@ -167,7 +167,7 @@ public class APNSender implements Managed, PushNotificationSender {
} else {
accepted = false;
rejectionReason = response.getRejectionReason();
unregistered = response.getRejectionReason().map(reason -> "Unregistered".equals(reason) || "BadDeviceToken".equals(reason))
unregistered = response.getRejectionReason().map(reason -> "Unregistered".equals(reason) || "BadDeviceToken".equals(reason) || "ExpiredToken".equals(reason))
.orElse(false);
}