1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

spell out m.new_devices no longer exist

This commit is contained in:
Matthew Hodgson
2018-08-29 20:20:52 +01:00
parent a6de395cde
commit ae95a49618

View File

@@ -488,6 +488,8 @@ MegolmEncryption.prototype.encryptMessage = function(room, eventType, content) {
session_id: session.sessionId, session_id: session.sessionId,
// Include our device ID so that recipients can send us a // Include our device ID so that recipients can send us a
// m.new_device message if they don't have our session key. // m.new_device message if they don't have our session key.
// XXX: Do we still need this now that m.new_device messages
// no longer exist since #483?
device_id: self._deviceId, device_id: self._deviceId,
}; };
@@ -550,12 +552,9 @@ MegolmEncryption.prototype._getDevicesInRoom = async function(room) {
// We are happy to use a cached version here: we assume that if we already // We are happy to use a cached version here: we assume that if we already
// have a list of the user's devices, then we already share an e2e room // have a list of the user's devices, then we already share an e2e 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. // device_lists in their /sync response. This cache should then be maintained
// // using all the device_lists changes and left fields.
// XXX: what if the cache is stale, and the user left the room we had in // See https://github.com/vector-im/riot-web/issues/2305 for details.
// common and then added new devices before joining this one? --Matthew
//
// yup, see https://github.com/vector-im/riot-web/issues/2305 --richvdh
const devices = await this._crypto.downloadKeys(roomMembers, false); const devices = await this._crypto.downloadKeys(roomMembers, false);
// remove any blocked devices // remove any blocked devices
for (const userId in devices) { for (const userId in devices) {