diff --git a/spec/unit/crypto/algorithms/megolm.spec.js b/spec/unit/crypto/algorithms/megolm.spec.js index a3134d477..e1da35db5 100644 --- a/spec/unit/crypto/algorithms/megolm.spec.js +++ b/spec/unit/crypto/algorithms/megolm.spec.js @@ -11,7 +11,6 @@ import logger from '../../../../lib/logger'; import TestClient from '../../../TestClient'; import olmlib from '../../../../lib/crypto/olmlib'; import Room from '../../../../lib/models/room'; -import DeviceInfo from '../../../../lib/crypto/deviceinfo'; const MatrixEvent = sdk.MatrixEvent; const MegolmDecryption = algorithms.DECRYPTION_CLASSES['m.megolm.v1.aes-sha2']; diff --git a/src/crypto/algorithms/megolm.js b/src/crypto/algorithms/megolm.js index ecdeed6c0..82d54dfc6 100644 --- a/src/crypto/algorithms/megolm.js +++ b/src/crypto/algorithms/megolm.js @@ -356,6 +356,10 @@ MegolmEncryption.prototype._prepareNewSession = async function() { * @param {object} devicesByUser * map from userid to list of devices * + * @param {array} errorDevices + * array that will be populated with the devices that can't get an + * olm session for + * * @return {array>} */ MegolmEncryption.prototype._splitUserDeviceMap = function( @@ -665,6 +669,10 @@ MegolmEncryption.prototype.reshareKeyWithDevice = async function( * * @param {object} devicesByUser * map from userid to list of devices + * + * @param {array} errorDevices + * array that will be populated with the devices that we can't get an + * olm session for */ MegolmEncryption.prototype._shareKeyWithDevices = async function( session, devicesByUser, errorDevices, diff --git a/src/crypto/store/indexeddb-crypto-store-backend.js b/src/crypto/store/indexeddb-crypto-store-backend.js index 7b78f2e09..5b81f581e 100644 --- a/src/crypto/store/indexeddb-crypto-store-backend.js +++ b/src/crypto/store/indexeddb-crypto-store-backend.js @@ -467,6 +467,7 @@ export class Backend { return result; } + // FIXME: we should probably prune this when devices get deleted async filterOutNotifiedErrorDevices(devices) { const txn = this._db.transaction("notified_error_devices", "readwrite"); const objectStore = txn.objectStore("notified_error_devices");