Commit 6ff04240 authored by yogevbd's avatar yogevbd

Fix payload

parent 5f228aad
...@@ -117,7 +117,7 @@ RCT_ENUM_CONVERTER(UIUserNotificationActivationMode, (@{ ...@@ -117,7 +117,7 @@ RCT_ENUM_CONVERTER(UIUserNotificationActivationMode, (@{
formattedNotification[@"body"] = RCTNullIfNil(content.body); formattedNotification[@"body"] = RCTNullIfNil(content.body);
formattedNotification[@"category"] = RCTNullIfNil(content.categoryIdentifier); formattedNotification[@"category"] = RCTNullIfNil(content.categoryIdentifier);
formattedNotification[@"thread"] = RCTNullIfNil(content.threadIdentifier); formattedNotification[@"thread"] = RCTNullIfNil(content.threadIdentifier);
formattedNotification[@"userInfo"] = RCTNullIfNil(RCTJSONClean(content.userInfo)); [formattedNotification addEntriesFromDictionary:RCTNullIfNil(RCTJSONClean(content.userInfo))];
return formattedNotification; return formattedNotification;
} }
......
...@@ -84,7 +84,7 @@ export default class NotificationsIOS { ...@@ -84,7 +84,7 @@ export default class NotificationsIOS {
} else if (type === DEVICE_NOTIFICATION_OPENED_EVENT) { } else if (type === DEVICE_NOTIFICATION_OPENED_EVENT) {
listener = DeviceEventEmitter.addListener( listener = DeviceEventEmitter.addListener(
type, type,
({payload, identifier, action}) => handler(new IOSNotification(payload), () => { (payload, identifier, action) => handler(new IOSNotification(payload), () => {
NativeRNNotifications.finishHandlingAction(identifier); NativeRNNotifications.finishHandlingAction(identifier);
}, action) }, action)
); );
...@@ -114,18 +114,6 @@ export default class NotificationsIOS { ...@@ -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 * Sets the notification categories
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment