From 947f7f9be1659cbf6b1633fe43cc224597d1c74f Mon Sep 17 00:00:00 2001 From: Libin Lu Date: Tue, 12 Sep 2017 09:12:28 -0400 Subject: [PATCH] add open_from_tray for local notif --- ios/RNFIRMessaging.m | 1 + 1 file changed, 1 insertion(+) diff --git a/ios/RNFIRMessaging.m b/ios/RNFIRMessaging.m index a17d876..c969cb3 100644 --- a/ios/RNFIRMessaging.m +++ b/ios/RNFIRMessaging.m @@ -151,6 +151,7 @@ RCT_EXPORT_MODULE(); + (void)didReceiveLocalNotification:(UILocalNotification *)notification { NSMutableDictionary* data = [[NSMutableDictionary alloc] initWithDictionary: notification.userInfo]; [data setValue:@"local_notification" forKey:@"_notificationType"]; + [data setValue:@(RCTSharedApplication().applicationState == UIApplicationStateInactive) forKey:@"opened_from_tray"]; [[NSNotificationCenter defaultCenter] postNotificationName:FCMNotificationReceived object:self userInfo:@{@"data": data}]; } -- 2.26.2