diff options
author | Vitaly Takmazov | 2018-09-20 15:16:06 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-09-20 15:16:06 +0300 |
commit | f58bb4d659f5d7dd43255a61ac8cb5023859d59d (patch) | |
tree | b4e8c60c6e6a63d1636e7b691877514321535ab0 /juick-notifications/src | |
parent | a9988515d26d3451bfad8bd5549f15c7648d5562 (diff) |
APNS: check token invalidation timestamp
Diffstat (limited to 'juick-notifications/src')
-rw-r--r-- | juick-notifications/src/main/java/com/juick/components/Notifications.java | 4 |
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); } |