Skip to content

Commit

Permalink
Fixed an issue in Android where 'to' field is missing from FCM payload.
Browse files Browse the repository at this point in the history
  • Loading branch information
neerhaj committed Oct 12, 2021
1 parent 68f9d25 commit 62cefb2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -55,7 +54,7 @@ static Map<String, String> convertMap(@NonNull Map<String, Object> 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));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit 62cefb2

Please sign in to comment.