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 @@ -22,7 +22,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, @@ -268,7 +268,7 @@ } } -function prepareEncryptedIOSNotifications( +function prepareEncryptedAPNsNotifications( devices: $ReadOnlyArray, notification: apn.Notification, codeVersion?: ?number, @@ -285,7 +285,7 @@ > { const notificationPromises = devices.map( async ({ cookieID, deviceToken }) => { - const notif = await encryptIOSNotification( + const notif = await encryptAPNsNotification( cookieID, notification, codeVersion, @@ -310,7 +310,7 @@ > { const notificationPromises = devices.map( async ({ deviceToken, cookieID }) => { - const { notification: notif } = await encryptIOSNotification( + const { notification: notif } = await encryptAPNsNotification( cookieID, notification, codeVersion, @@ -416,7 +416,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'; @@ -969,7 +969,7 @@ })); } - const notifsWithMessageInfos = await prepareEncryptedIOSNotifications( + const notifsWithMessageInfos = await prepareEncryptedAPNsNotifications( devices, copyWithMessageInfos, platformDetails.codeVersion, @@ -996,7 +996,7 @@ ); } - const notifsWithoutMessageInfos = await prepareEncryptedIOSNotifications( + const notifsWithoutMessageInfos = await prepareEncryptedAPNsNotifications( devicesWithExcessiveSize, notification, platformDetails.codeVersion, @@ -1617,7 +1617,7 @@ const preparePromise: Promise = (async () => { let targetedNotifications: $ReadOnlyArray; if (codeVersion > 222) { - const notificationsArray = await prepareEncryptedIOSNotifications( + const notificationsArray = await prepareEncryptedAPNsNotifications( deviceInfos, notification, codeVersion,