Changeset View
Changeset View
Standalone View
Standalone View
keyserver/src/push/send.js
Show First 20 Lines • Show All 619 Lines • ▼ Show 20 Lines | ): Promise<apn.Notification> { | ||||
notification.badge = unreadCount; | notification.badge = unreadCount; | ||||
notification.threadId = threadID; | notification.threadId = threadID; | ||||
notification.id = uniqueID; | notification.id = uniqueID; | ||||
notification.pushType = 'alert'; | notification.pushType = 'alert'; | ||||
notification.payload.id = uniqueID; | notification.payload.id = uniqueID; | ||||
notification.payload.threadID = threadID; | notification.payload.threadID = threadID; | ||||
// It was agreed to temporarily make even releases staff-only. This way | if (platformDetails.codeVersion && platformDetails.codeVersion > 198) { | ||||
// 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 > 198 && | |||||
platformDetails.codeVersion % 2 === 0 | |||||
) { | |||||
notification.mutableContent = true; | notification.mutableContent = true; | ||||
} | } | ||||
if (collapseKey) { | if (collapseKey) { | ||||
notification.collapseId = collapseKey; | notification.collapseId = collapseKey; | ||||
} | } | ||||
const messageInfos = JSON.stringify(newRawMessageInfos); | const messageInfos = JSON.stringify(newRawMessageInfos); | ||||
// We make a copy before checking notification's length, because calling | // We make a copy before checking notification's length, because calling | ||||
// length compiles the notification and makes it immutable. Further | // length compiles the notification and makes it immutable. Further | ||||
▲ Show 20 Lines • Show All 420 Lines • Show Last 20 Lines |