Skip to content

Commit

Permalink
fix(ios, messaging): serialize google.c.sender.id to message.from
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Avishay Matayev authored and mikehardy committed Jan 6, 2022
1 parent 454dc70 commit d3621eb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

1 comment on commit d3621eb

@vercel
Copy link

@vercel vercel bot commented on d3621eb Jan 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.