Skip to content

Commit

Permalink
IOS: Added identification for which action was taken in case there wa… (
Browse files Browse the repository at this point in the history
#328)

* IOS: Added identification for which action was taken in case there was many

* Changed the action identifier key to _actionIdentifier
  • Loading branch information
alialamine authored and Libin Lu committed Feb 24, 2017
1 parent c028234 commit 7d867f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ios/RNFIRMessaging.m
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ + (void)didReceiveNotificationResponse:(UNNotificationResponse *)response withCo
NSMutableDictionary* data = [[NSMutableDictionary alloc] initWithDictionary: response.notification.request.content.userInfo];
[data setValue:@"notification_response" forKey:@"_notificationType"];
[data setValue:@YES forKey:@"opened_from_tray"];
if (response.actionIdentifier) {
[data setValue:response.actionIdentifier forKey:@"_actionIdentifier"];
}
[[NSNotificationCenter defaultCenter] postNotificationName:FCMNotificationReceived object:self userInfo:@{@"data": data, @"completionHandler": completionHandler}];
}

Expand Down

0 comments on commit 7d867f8

Please sign in to comment.