Skip to content

Commit 4637332

Browse files
committed
fix(messaging, android): avoid using rn61+ symbol
this should be the inline equivalent of the rn61 symbol I added in #5236 - accidentally breaking react-native 0.60 compatibility
1 parent d931b48 commit 4637332

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/messaging/android/src/main/java/io/invertase/firebase/messaging/ReactNativeFirebaseMessagingModule.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import com.facebook.react.bridge.ReactMethod;
3030
import com.facebook.react.bridge.ReadableMap;
3131
import com.facebook.react.bridge.WritableMap;
32+
import com.facebook.react.bridge.WritableNativeMap;
3233
import com.google.android.gms.tasks.Tasks;
3334
import com.google.firebase.iid.FirebaseInstanceId;
3435
import com.google.firebase.messaging.FirebaseMessaging;
@@ -231,7 +232,9 @@ public void onNewIntent(Intent intent) {
231232

232233
if (remoteMessageMap != null) {
233234
// WritableNativeMap not be consumed twice. But it is resolved in future and in event below. Make a copy - issue #5231
234-
initialNotification = remoteMessageMap.copy();
235+
WritableNativeMap newInitialNotification = new WritableNativeMap();
236+
newInitialNotification.merge(remoteMessageMap);
237+
initialNotification = newInitialNotification;
235238
ReactNativeFirebaseMessagingReceiver.notifications.remove(messageId);
236239

237240
ReactNativeFirebaseEventEmitter emitter = ReactNativeFirebaseEventEmitter.getSharedInstance();

0 commit comments

Comments
 (0)