Skip to content

Commit fb5d072

Browse files
authored
fix method for checking duplicate push notificaitons (#447)
1 parent 1f648a6 commit fb5d072

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Leanplum-SDK/Classes/Notifications/Push/LPPushNotificationsHandler.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
@interface LPPushNotificationsHandler()
1717
@property (nonatomic, strong) LPCountAggregator *countAggregator;
18-
@property (nonatomic, strong) NSString *notificationHandled;
18+
@property (nonatomic, strong) NSDictionary *notificationHandled;
1919
@property (nonatomic, strong) NSDate *notificationHandledTime;
2020
@end
2121

@@ -526,12 +526,12 @@ - (BOOL)areActionsEmbedded:(NSDictionary *)userInfo
526526

527527
- (BOOL)isDuplicateNotification:(NSDictionary *)userInfo
528528
{
529-
if ([self.notificationHandled isEqualToString:[LPJSON stringFromJSON:userInfo]] &&
529+
if ([self.notificationHandled isEqualToDictionary:userInfo] &&
530530
[[NSDate date] timeIntervalSinceDate:self.notificationHandledTime] < 10.0) {
531531
return YES;
532532
}
533533

534-
self.notificationHandled = [LPJSON stringFromJSON:userInfo];
534+
self.notificationHandled = userInfo;
535535
self.notificationHandledTime = [NSDate date];
536536
return NO;
537537
}

0 commit comments

Comments
 (0)