From 41f5dd9a24f8cac4029259396bf0b82bd2b30461 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Sun, 5 Aug 2018 10:55:45 +0200 Subject: [PATCH] Dont cancel guest notifications as there are none Signed-off-by: Mario Danic --- .../main/java/com/nextcloud/talk/utils/NotificationUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/utils/NotificationUtils.java b/app/src/main/java/com/nextcloud/talk/utils/NotificationUtils.java index 71efeef15..1915ee9e4 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/NotificationUtils.java +++ b/app/src/main/java/com/nextcloud/talk/utils/NotificationUtils.java @@ -73,7 +73,7 @@ public class NotificationUtils { } public static void cancelExistingNotifications(Context context, UserEntity conversationUser) { - if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) { + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M && conversationUser.getId() != -1) { NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);