1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-09 10:22:46 +03:00

Address my own review comments

This commit is contained in:
Richard van der Hoff
2017-01-25 11:02:49 +00:00
parent e79926db6c
commit 4ccd649358
2 changed files with 5 additions and 3 deletions

View File

@@ -473,8 +473,10 @@ MegolmEncryption.prototype._getDevicesInRoom = function(room) {
// with them, which means that they will have announced any new devices via // with them, which means that they will have announced any new devices via
// an m.new_device. // an m.new_device.
// //
// XXX: what if the cache is stale, and the user left the room we had in common // XXX: what if the cache is stale, and the user left the room we had in
// and then added new devices before joining this one? --Matthew // common and then added new devices before joining this one? --Matthew
//
// yup, see https://github.com/vector-im/riot-web/issues/2305 --richvdh
return this._crypto.downloadKeys(roomMembers, false).then(function(devices) { return this._crypto.downloadKeys(roomMembers, false).then(function(devices) {
// remove any blocked devices // remove any blocked devices
for (const userId in devices) { for (const userId in devices) {

View File

@@ -711,7 +711,7 @@ Crypto.prototype.setDeviceVerification = function(userId, deviceId, verified,
} }
let knownStatus = dev.known; let knownStatus = dev.known;
if (known !== null) { if (known !== null && known !== undefined) {
knownStatus = known; knownStatus = known;
} }