1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00
or at least the rules that are consistent with the rest of our
codebase
This commit is contained in:
David Baker
2019-02-01 18:12:27 +00:00
parent 7195365188
commit 7dedcb82b2
5 changed files with 82 additions and 42 deletions

View File

@@ -788,7 +788,9 @@ class DeviceListUpdateSerialiser {
let prom = Promise.resolve();
for (const userId of downloadUsers) {
prom = prom.delay(5).then(() => {
return this._processQueryResponseForUser(userId, dk[userId], ssks[userId]);
return this._processQueryResponseForUser(
userId, dk[userId], ssks[userId],
);
});
}
@@ -812,9 +814,9 @@ class DeviceListUpdateSerialiser {
return deferred.promise;
}
async _processQueryResponseForUser(userId, dk_response, ssk_response) {
logger.log('got device keys for ' + userId + ':', dk_response);
logger.log('got self-signing keys for ' + userId + ':', ssk_response);
async _processQueryResponseForUser(userId, dkResponse, sskResponse) {
logger.log('got device keys for ' + userId + ':', dkResponse);
logger.log('got self-signing keys for ' + userId + ':', sskResponse);
{
// map from deviceid -> deviceinfo for this user
@@ -828,7 +830,7 @@ class DeviceListUpdateSerialiser {
}
await _updateStoredDeviceKeysForUser(
this._olmDevice, userId, userStore, dk_response || {},
this._olmDevice, userId, userStore, dkResponse || {},
);
// put the updates into the object that will be returned as our results
@@ -845,7 +847,7 @@ class DeviceListUpdateSerialiser {
const ssk = this._deviceList.getRawStoredSskForUser(userId) || {};
const updated = await _updateStoredSelfSigningKeyForUser(
this._olmDevice, userId, ssk, ssk_response || {},
this._olmDevice, userId, ssk, sskResponse || {},
);
this._deviceList.setRawStoredSskForUser(userId, ssk);