aboutsummaryrefslogtreecommitdiff
path: root/juick-notifications/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-notifications/src/main/java')
-rw-r--r--juick-notifications/src/main/java/com/juick/components/Notifications.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/juick-notifications/src/main/java/com/juick/components/Notifications.java b/juick-notifications/src/main/java/com/juick/components/Notifications.java
index 7b3f823e..53bf8684 100644
--- a/juick-notifications/src/main/java/com/juick/components/Notifications.java
+++ b/juick-notifications/src/main/java/com/juick/components/Notifications.java
@@ -229,6 +229,10 @@ public class Notifications extends TextWebSocketHandler implements NotificationC
invalidAPNSTokens.add(token);
}
}
+ if (pushNotificationResponse.getTokenInvalidationTimestamp().before(new Date())) {
+ logger.info("Token invalidated: {}", token);
+ invalidAPNSTokens.add(token);
+ }
} catch (final ExecutionException | InterruptedException ex) {
logger.info("APNS exception", ex);
}