File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -128,14 +128,16 @@ @implementation RNCPushNotificationIOS
128128}
129129
130130API_AVAILABLE (ios(10.0 ))
131- static NSDictionary *RCTFormatOpenedUNNotification(UNNotification *notification )
131+ static NSDictionary *RCTFormatOpenedUNNotification(UNNotificationResponse *response )
132132{
133+ UNNotification * notification = response.notification ;
133134 NSMutableDictionary *formattedNotification = [RCTFormatUNNotification (notification) mutableCopy ];
134135 UNNotificationContent *content = notification.request .content ;
135136
136137 NSMutableDictionary *userInfo = [content.userInfo mutableCopy ];
137138 userInfo[@" userInteraction" ] = [NSNumber numberWithInt: 1 ];
138-
139+ userInfo[@" actionIdentifier" ] = response.actionIdentifier ;
140+
139141 formattedNotification[@" userInfo" ] = RCTNullIfNil (RCTJSONClean (userInfo));
140142
141143 return formattedNotification;
@@ -236,7 +238,7 @@ + (void)didReceiveNotificationResponse:(UNNotificationResponse *)response
236238API_AVAILABLE(ios(10.0 )) {
237239 [[NSNotificationCenter defaultCenter ] postNotificationName: kLocalNotificationReceived
238240 object: self
239- userInfo: RCTFormatOpenedUNNotification (response.notification )];
241+ userInfo: RCTFormatOpenedUNNotification (response)];
240242}
241243
242244- (void )handleLocalNotificationReceived : (NSNotification *)notification
You can’t perform that action at this time.
0 commit comments