diff --git a/keyserver/src/push/rescind.js b/keyserver/src/push/rescind.js --- a/keyserver/src/push/rescind.js +++ b/keyserver/src/push/rescind.js @@ -169,7 +169,7 @@ // It was agreed to temporarily make even releases staff-only. This way // we will be able to prevent shipping NSE functionality to public iOS // users until it is thoroughly tested among staff members. - if (codeVersion && codeVersion > 1000 && codeVersion % 2 === 0) { + if (codeVersion && codeVersion > 198 && codeVersion % 2 === 0) { notification.mutableContent = true; notification.pushType = 'alert'; notification.badge = unreadCount; diff --git a/keyserver/src/push/send.js b/keyserver/src/push/send.js --- a/keyserver/src/push/send.js +++ b/keyserver/src/push/send.js @@ -632,7 +632,7 @@ // users until it is thoroughly tested among staff members. if ( platformDetails.codeVersion && - platformDetails.codeVersion > 1000 && + platformDetails.codeVersion > 198 && platformDetails.codeVersion % 2 === 0 ) { notification.mutableContent = true; diff --git a/native/ios/Comm/AppDelegate.mm b/native/ios/Comm/AppDelegate.mm --- a/native/ios/Comm/AppDelegate.mm +++ b/native/ios/Comm/AppDelegate.mm @@ -54,7 +54,6 @@ #import -NSString *const backgroundNotificationTypeKey = @"backgroundNotifType"; NSString *const setUnreadStatusKey = @"setUnreadStatus"; NSString *const threadIDKey = @"threadID"; @@ -173,43 +172,11 @@ didReceiveRemoteNotification:(NSDictionary *)notification fetchCompletionHandler: (void (^)(UIBackgroundFetchResult))completionHandler { - BOOL handled = NO; - if (notification[@"aps"][@"content-available"] && - notification[backgroundNotificationTypeKey]) { - handled = [self handleBackgroundNotification:notification - fetchCompletionHandler:completionHandler]; - } - - if (handled) { - return; - } [CommIOSNotifications didReceiveRemoteNotification:notification fetchCompletionHandler:completionHandler]; } -- (BOOL)handleBackgroundNotification:(NSDictionary *)notification - fetchCompletionHandler: - (void (^)(UIBackgroundFetchResult))completionHandler { - if ([notification[backgroundNotificationTypeKey] isEqualToString:@"CLEAR"]) { - if (notification[setUnreadStatusKey] && notification[@"threadID"]) { - std::string threadID = - std::string([notification[@"threadID"] UTF8String]); - // this callback may be called from inactive state so we need - // to initialize the database - [self attemptDatabaseInitialization]; - comm::GlobalDBSingleton::instance.scheduleOrRun([threadID]() mutable { - comm::ThreadOperations::updateSQLiteUnreadStatus(threadID, false); - }); - } - [CommIOSNotifications - clearNotificationFromNotificationsCenter:notification[@"notificationId"] - completionHandler:completionHandler]; - return YES; - } - return NO; -} - - (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window { return [Orientation getOrientation];