Commit 0157a9f4 by Sebastián Katzer

Fix 'Invalid type in JSON write (__NSDate)' after updating notification

parent 3b159c88
...@@ -186,6 +186,14 @@ NSString* const DEFAULT_SOUND = @"res://platform_default"; ...@@ -186,6 +186,14 @@ NSString* const DEFAULT_SOUND = @"res://platform_default";
*/ */
- (NSDictionary*) userInfo - (NSDictionary*) userInfo
{ {
if ([dict objectForKey:@"updatedAt"]) {
NSMutableDictionary* data = [dict mutableCopy];
[data removeObjectForKey:@"updatedAt"];
return data;
}
return dict; return dict;
} }
......
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
for (UILocalNotification* notification in notifications) for (UILocalNotification* notification in notifications)
{ {
[options addObject:notification.userInfo]; [options addObject:notification.options.userInfo];
} }
return options; return options;
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
for (UILocalNotification* notification in notifications) for (UILocalNotification* notification in notifications)
{ {
if (notification.type == type) { if (notification.type == type) {
[options addObject:notification.userInfo]; [options addObject:notification.options.userInfo];
} }
} }
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
notification = [self localNotificationWithId:id]; notification = [self localNotificationWithId:id];
if (notification) { if (notification) {
[options addObject:notification.userInfo]; [options addObject:notification.options.userInfo];
} }
} }
...@@ -292,7 +292,7 @@ ...@@ -292,7 +292,7 @@
notification = [self localNotificationWithId:id]; notification = [self localNotificationWithId:id];
if (notification && notification.type == type) { if (notification && notification.type == type) {
[options addObject:notification.userInfo]; [options addObject:notification.options.userInfo];
} }
} }
......
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