From 62cefb222da6a9598eac181df5cbdd6d37cf00c8 Mon Sep 17 00:00:00 2001 From: Neerhaj N Joshi Date: Tue, 12 Oct 2021 11:49:53 +0530 Subject: [PATCH] Fixed an issue in Android where 'to' field is missing from FCM payload. --- .../src/main/java/com/pushio/manager/rn/RCTPIOCommonUtils.java | 3 +-- package.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/android/src/main/java/com/pushio/manager/rn/RCTPIOCommonUtils.java b/android/src/main/java/com/pushio/manager/rn/RCTPIOCommonUtils.java index 5045645..82817e4 100644 --- a/android/src/main/java/com/pushio/manager/rn/RCTPIOCommonUtils.java +++ b/android/src/main/java/com/pushio/manager/rn/RCTPIOCommonUtils.java @@ -42,7 +42,6 @@ class RCTPIOCommonUtils { private static final String FB_KEY_DATA = "data"; private static final String FB_KEY_MESSAGE_ID = "messageId"; private static final String FB_KEY_MESSAGE_TYPE = "messageType"; - private static final String FB_KEY_TO = "to"; private static final String FB_KEY_TTL = "ttl"; private static final String DATE_FORMAT_ISO8601 = "yyyy-MM-dd'T'HH:mm:ssZZZZZ"; @@ -55,7 +54,7 @@ static Map convertMap(@NonNull Map map) { } static RemoteMessage remoteMessageFromReadableMap(ReadableMap readableMap) { - RemoteMessage.Builder builder = new RemoteMessage.Builder(readableMap.getString(FB_KEY_TO)); + RemoteMessage.Builder builder = new RemoteMessage.Builder("rsys_internal"); if (readableMap.hasKey(FB_KEY_TTL)) { builder.setTtl(readableMap.getInt(FB_KEY_TTL)); diff --git a/package.json b/package.json index 2b113c2..a61501f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@oracle/react-native-pushiomanager", - "version": "6.50.0", + "version": "6.50.1", "description": "React Native Module for Responsys Mobile SDK", "main": "index.js", "repository": {