From c620dc713c237e0f8978d2b1e30286d896df3076 Mon Sep 17 00:00:00 2001 From: ValVNC Date: Fri, 21 May 2021 13:03:47 +0300 Subject: [PATCH] fix: notifications after logout; --- src/android/FirebasePluginMessagingService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/android/FirebasePluginMessagingService.java b/src/android/FirebasePluginMessagingService.java index c32ce5038..7cc47a5ed 100755 --- a/src/android/FirebasePluginMessagingService.java +++ b/src/android/FirebasePluginMessagingService.java @@ -1,6 +1,7 @@ package org.apache.cordova.firebase; import android.content.Context; +import android.text.TextUtils; import android.util.Log; import com.crashlytics.android.Crashlytics; @@ -79,6 +80,9 @@ public void onMessageReceived(RemoteMessage remoteMessage) { } payloadProcessor.processTaskPayload(payload); } else if (payload.get("appointmentId") != null) { + String mToken = SharedPrefsUtils.getString(getApplicationContext(), "auth-token"); + if(TextUtils.isEmpty(mToken)) return; + payloadProcessor.processCalendarPayload(payload); } else if (payload.containsKey("subject") && payload.containsKey("fromAddress")) { payloadProcessor.processMailPayload(payload);