diff --git a/RNNotifications/RCTConvert+Notifications.m b/RNNotifications/RCTConvert+Notifications.m index d74a592c770f32dc54480ccc9e98de9c49ec2655..3129d4247c5720e3233f4034d139a3668d039515 100644 --- a/RNNotifications/RCTConvert+Notifications.m +++ b/RNNotifications/RCTConvert+Notifications.m @@ -117,7 +117,7 @@ RCT_ENUM_CONVERTER(UIUserNotificationActivationMode, (@{ formattedNotification[@"body"] = RCTNullIfNil(content.body); formattedNotification[@"category"] = RCTNullIfNil(content.categoryIdentifier); formattedNotification[@"thread"] = RCTNullIfNil(content.threadIdentifier); - formattedNotification[@"userInfo"] = RCTNullIfNil(RCTJSONClean(content.userInfo)); + [formattedNotification addEntriesFromDictionary:RCTNullIfNil(RCTJSONClean(content.userInfo))]; return formattedNotification; } diff --git a/lib/src/index.ios.js b/lib/src/index.ios.js index 3e87af9d459078754a7996407f5f762e075b0e6f..171222d8a65365d90343490ab7340cded0e8095a 100644 --- a/lib/src/index.ios.js +++ b/lib/src/index.ios.js @@ -84,7 +84,7 @@ export default class NotificationsIOS { } else if (type === DEVICE_NOTIFICATION_OPENED_EVENT) { listener = DeviceEventEmitter.addListener( type, - ({payload, identifier, action}) => handler(new IOSNotification(payload), () => { + (payload, identifier, action) => handler(new IOSNotification(payload), () => { NativeRNNotifications.finishHandlingAction(identifier); }, action) ); @@ -114,18 +114,6 @@ export default class NotificationsIOS { } } - static _actionHandlerDispatcher(action: Object) { - const actionHandler = _actionHandlers.get(action.identifier); - - if (actionHandler) { - action.notification = new IOSNotification(action.notification); - - actionHandler(action, () => { - NativeRNNotifications.finishHandlingAction(action.identifier); - }); - } - } - /** * Sets the notification categories */