From e295cbbcc65ad3b8953152dcaedc0d8ee002b8e4 Mon Sep 17 00:00:00 2001 From: Gleidson Daniel Silva Date: Fri, 1 Dec 2023 13:41:01 -0300 Subject: [PATCH] fix: add type checking on notificationType (#5376) * add typecheking on notificationType * add typecheking using instanceOf --- .../java/chat/rocket/reactnative/CustomPushNotification.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/src/play/java/chat/rocket/reactnative/CustomPushNotification.java b/android/app/src/play/java/chat/rocket/reactnative/CustomPushNotification.java index e77cf5eb3..efa5a8480 100644 --- a/android/app/src/play/java/chat/rocket/reactnative/CustomPushNotification.java +++ b/android/app/src/play/java/chat/rocket/reactnative/CustomPushNotification.java @@ -97,7 +97,7 @@ public class CustomPushNotification extends PushNotification { bundle.putString("senderId", hasSender ? loadedEjson.sender._id : "1"); bundle.putString("avatarUri", loadedEjson.getAvatarUri()); - if (loadedEjson.notificationType.equals("videoconf")) { + if (loadedEjson.notificationType instanceof String && loadedEjson.notificationType.equals("videoconf")) { notifyReceivedToJS(); } else { notificationMessages.get(notId).add(bundle);