1
0
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:
David Baker
2015-07-21 13:10:01 -07:00
parent 8b2f11edc9
commit a0fc8df3e1

View File

@@ -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);
}
}