You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2026-01-03 23:22:30 +03:00
Fix more minor things from PR comments
This commit is contained in:
@@ -355,7 +355,7 @@ MatrixClient.prototype.setRoomEncryption = function(roomId, config) {
|
||||
this.sessionStore.storeEndToEndRoom(roomId, config);
|
||||
return deferred.promise;
|
||||
} else {
|
||||
throw new Error("Unknown algorithm: " + OLM_ALGORITHM);
|
||||
throw new Error("Unknown algorithm: " + config.algorithm);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -635,7 +635,7 @@ function _encryptMessage(client, roomId, e2eRoomInfo, eventType, content,
|
||||
var devices = client.sessionStore.getEndToEndDevicesForUser(userId);
|
||||
for (var deviceId in devices) {
|
||||
if (devices.hasOwnProperty(deviceId)) {
|
||||
var keys = devices[deviceId];
|
||||
var keys = devices[deviceId];
|
||||
for (var keyId in keys.keys) {
|
||||
if (keyId.indexOf("curve25519:") === 0) {
|
||||
participantKeys.push(keys.keys[keyId]);
|
||||
@@ -696,7 +696,7 @@ function _encryptMessage(client, roomId, e2eRoomInfo, eventType, content,
|
||||
};
|
||||
return encryptedContent;
|
||||
} else {
|
||||
throw new Error("Unknown end-to-end algorithm");
|
||||
throw new Error("Unknown end-to-end algorithm: " + e2eRoomInfo.algorithm);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user