From cdde4b55c74e7c035f1c8cf8a9c4d5b47f494076 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 15 Oct 2018 17:15:54 +0300 Subject: notifications: fix FCM error codes --- .../src/main/java/com/juick/components/FirebaseManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'juick-notifications/src/main/java/com') diff --git a/juick-notifications/src/main/java/com/juick/components/FirebaseManager.java b/juick-notifications/src/main/java/com/juick/components/FirebaseManager.java index f3f97131..1feee458 100644 --- a/juick-notifications/src/main/java/com/juick/components/FirebaseManager.java +++ b/juick-notifications/src/main/java/com/juick/components/FirebaseManager.java @@ -77,9 +77,9 @@ public class FirebaseManager implements NotificationListener { if (t instanceof FirebaseMessagingException) { FirebaseMessagingException e = (FirebaseMessagingException) t; logger.warn("FirebaseMessaging error: {}", e.getErrorCode()); - if (e.getErrorCode().equals("messaging/invalid-argument") - || e.getErrorCode().equals("messaging/registration-token-not-registered") - || e.getErrorCode().equals("messaging/invalid-registration-token")) { + if (e.getErrorCode().equals("invalid-argument") + || e.getErrorCode().equals("registration-token-not-registered") + || e.getErrorCode().equals("invalid-registration-token")) { // invalid token logger.info("{} is scheduled to remove", token); notificationsManager.addInvalidGCMToken(token); -- cgit v1.2.3