diff --git a/web/push-notif/notif-crypto-utils.js b/web/push-notif/notif-crypto-utils.js --- a/web/push-notif/notif-crypto-utils.js +++ b/web/push-notif/notif-crypto-utils.js @@ -207,12 +207,6 @@ synchronizationValue, } = queryResult; - if (!notificationAccount || !notificationAccountEncryptionKey) { - throw new Error( - 'Attempt to decrypt notification but olm account not initialized.', - ); - } - const encryptedOlmData: ?EncryptedData = maybeEncryptedOlmData ? assertWithValidator(maybeEncryptedOlmData, encryptedAESDataValidator) : undefined; @@ -227,7 +221,7 @@ const [encryptionKey, accountEncryptionKey] = await Promise.all([ validateCryptoKeyOptional(olmDataEncryptionKey), - validateCryptoKey(notificationAccountEncryptionKey), + validateCryptoKeyOptional(notificationAccountEncryptionKey), ]); return {