diff --git a/keyserver/src/push/crypto.js b/keyserver/src/push/crypto.js --- a/keyserver/src/push/crypto.js +++ b/keyserver/src/push/crypto.js @@ -21,7 +21,7 @@ import { encrypt, generateKey } from '../utils/aes-crypto-utils.js'; import { getOlmUtility } from '../utils/olm-utils.js'; -async function encryptIOSNotification( +async function encryptAPNsNotification( cookieID: string, notification: apn.Notification, codeVersion?: ?number, @@ -260,7 +260,7 @@ } } -function prepareEncryptedIOSNotifications( +function prepareEncryptedAPNsNotifications( devices: $ReadOnlyArray, notification: apn.Notification, codeVersion?: ?number, @@ -277,7 +277,7 @@ > { const notificationPromises = devices.map( async ({ cookieID, deviceToken }) => { - const notif = await encryptIOSNotification( + const notif = await encryptAPNsNotification( cookieID, notification, codeVersion, @@ -302,7 +302,7 @@ > { const notificationPromises = devices.map( async ({ deviceToken, cookieID }) => { - const { notification: notif } = await encryptIOSNotification( + const { notification: notif } = await encryptAPNsNotification( cookieID, notification, codeVersion, @@ -408,7 +408,7 @@ } export { - prepareEncryptedIOSNotifications, + prepareEncryptedAPNsNotifications, prepareEncryptedIOSNotificationRescind, prepareEncryptedAndroidNotifications, prepareEncryptedAndroidNotificationRescinds, 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 @@ -47,7 +47,7 @@ import { tID, tPlatformDetails, tShape } from 'lib/utils/validation-utils.js'; import { - prepareEncryptedIOSNotifications, + prepareEncryptedAPNsNotifications, prepareEncryptedAndroidNotifications, prepareEncryptedWebNotifications, } from './crypto.js'; @@ -954,7 +954,7 @@ })); } - const notifsWithMessageInfos = await prepareEncryptedIOSNotifications( + const notifsWithMessageInfos = await prepareEncryptedAPNsNotifications( devices, copyWithMessageInfos, platformDetails.codeVersion, @@ -981,7 +981,7 @@ ); } - const notifsWithoutMessageInfos = await prepareEncryptedIOSNotifications( + const notifsWithoutMessageInfos = await prepareEncryptedAPNsNotifications( devicesWithExcessiveSize, notification, platformDetails.codeVersion, @@ -1602,7 +1602,7 @@ const preparePromise: Promise = (async () => { let targetedNotifications: $ReadOnlyArray; if (codeVersion > 222) { - const notificationsArray = await prepareEncryptedIOSNotifications( + const notificationsArray = await prepareEncryptedAPNsNotifications( deviceInfos, notification, codeVersion,