From a0fc8df3e1982102ccd3bcbd6cab12ab4ec4dd37 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 21 Jul 2015 13:10:01 -0700 Subject: [PATCH] Fix more minor things from PR comments --- lib/client.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/client.js b/lib/client.js index 452774aa0..5aff51cf2 100644 --- a/lib/client.js +++ b/lib/client.js @@ -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); } }