From d3621ebee9a081c7f7c11c1d4bf8cf8f43e6182b Mon Sep 17 00:00:00 2001 From: Avishay Matayev Date: Thu, 6 Jan 2022 14:39:25 +0200 Subject: [PATCH] fix(ios, messaging): serialize google.c.sender.id to message.from This from key was provided in react-native-firebase v5 and somewhere along the way it was lost, the iOS SDK now passes this key through the internal google.c.sender.id key in userInfo, use it as well. --- packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m b/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m index aabc8ff64e..7bcdb41e41 100644 --- a/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m +++ b/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m @@ -63,7 +63,7 @@ + (NSDictionary *)remoteMessageUserInfoToDict:(NSDictionary *)userInfo { } // message.from - if ([key isEqualToString:@"from"]) { + if ([key isEqualToString:@"from"] || [key isEqualToString:@"google.c.sender.id"]) { message[@"from"] = userInfo[key]; continue; }