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 @@ -161,13 +161,23 @@ codeVersion: ?number, ): apn.Notification { const notification = new apn.Notification(); - notification.contentAvailable = true; notification.topic = getAPNsNotificationTopic({ platform: 'ios', codeVersion: codeVersion ?? undefined, }); - notification.priority = 5; - notification.pushType = 'background'; + + // 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) { + notification.mutableContent = true; + notification.pushType = 'alert'; + notification.badge = unreadCount; + } else { + notification.priority = 5; + notification.contentAvailable = true; + notification.pushType = 'background'; + } notification.payload = codeVersion && codeVersion > 135 ? { 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 @@ -626,7 +626,15 @@ notification.pushType = 'alert'; notification.payload.id = uniqueID; notification.payload.threadID = threadID; - if (platformDetails.codeVersion && platformDetails.codeVersion > 1000) { + + // 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 ( + platformDetails.codeVersion && + platformDetails.codeVersion > 1000 && + platformDetails.codeVersion % 2 === 0 + ) { notification.mutableContent = true; } if (collapseKey) {