1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-29 16:43:09 +03:00

lint (and add a comment)

This commit is contained in:
Hubert Chathi
2020-01-10 13:36:11 -05:00
parent 63c57e8e02
commit b3a16cb852
3 changed files with 9 additions and 1 deletions

View File

@@ -11,7 +11,6 @@ import logger from '../../../../lib/logger';
import TestClient from '../../../TestClient'; import TestClient from '../../../TestClient';
import olmlib from '../../../../lib/crypto/olmlib'; import olmlib from '../../../../lib/crypto/olmlib';
import Room from '../../../../lib/models/room'; import Room from '../../../../lib/models/room';
import DeviceInfo from '../../../../lib/crypto/deviceinfo';
const MatrixEvent = sdk.MatrixEvent; const MatrixEvent = sdk.MatrixEvent;
const MegolmDecryption = algorithms.DECRYPTION_CLASSES['m.megolm.v1.aes-sha2']; const MegolmDecryption = algorithms.DECRYPTION_CLASSES['m.megolm.v1.aes-sha2'];

View File

@@ -356,6 +356,10 @@ MegolmEncryption.prototype._prepareNewSession = async function() {
* @param {object<string, module:crypto/deviceinfo[]>} devicesByUser * @param {object<string, module:crypto/deviceinfo[]>} devicesByUser
* map from userid to list of devices * map from userid to list of devices
* *
* @param {array<object>} errorDevices
* array that will be populated with the devices that can't get an
* olm session for
*
* @return {array<object<userid, deviceInfo>>} * @return {array<object<userid, deviceInfo>>}
*/ */
MegolmEncryption.prototype._splitUserDeviceMap = function( MegolmEncryption.prototype._splitUserDeviceMap = function(
@@ -665,6 +669,10 @@ MegolmEncryption.prototype.reshareKeyWithDevice = async function(
* *
* @param {object<string, module:crypto/deviceinfo[]>} devicesByUser * @param {object<string, module:crypto/deviceinfo[]>} devicesByUser
* map from userid to list of devices * map from userid to list of devices
*
* @param {array<object>} errorDevices
* array that will be populated with the devices that we can't get an
* olm session for
*/ */
MegolmEncryption.prototype._shareKeyWithDevices = async function( MegolmEncryption.prototype._shareKeyWithDevices = async function(
session, devicesByUser, errorDevices, session, devicesByUser, errorDevices,

View File

@@ -467,6 +467,7 @@ export class Backend {
return result; return result;
} }
// FIXME: we should probably prune this when devices get deleted
async filterOutNotifiedErrorDevices(devices) { async filterOutNotifiedErrorDevices(devices) {
const txn = this._db.transaction("notified_error_devices", "readwrite"); const txn = this._db.transaction("notified_error_devices", "readwrite");
const objectStore = txn.objectStore("notified_error_devices"); const objectStore = txn.objectStore("notified_error_devices");