Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit a9e3ab8

Browse files
committed
Prevent this issue #1671.
1 parent a32a63c commit a9e3ab8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

android/src/main/java/com/dieam/reactnativepushnotification/modules/RNReceivedMessageHandler.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ public void handleReceivedMessage(RemoteMessage message) {
4949
bundle.putString("sound", remoteNotification.getSound());
5050
bundle.putString("color", remoteNotification.getColor());
5151
bundle.putString("tag", remoteNotification.getTag());
52-
bundle.putString("channelId", remoteNotification.getChannelId());
52+
53+
if(remoteNotification.getChannelId() != null) {
54+
bundle.putString("channelId", remoteNotification.getChannelId());
55+
}
56+
else {
57+
bundle.putString("channelId", "fcm_fallback_notification_channel");
58+
}
5359

5460
Integer visibilty = remoteNotification.getVisibility();
5561
String visibilityString = "private";

0 commit comments

Comments
 (0)