From 7c3104b2aeb73b6c4544e382b42c501dbd42fa1d Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Wed, 8 Jun 2016 16:38:40 +0100 Subject: [PATCH] client: fix bug marking all sent events as encrypted --- lib/client.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/client.js b/lib/client.js index a05bd70fc..3a9b12837 100644 --- a/lib/client.js +++ b/lib/client.js @@ -941,10 +941,11 @@ MatrixClient.prototype.sendEvent = function(roomId, eventType, content, txnId, ); localEvent.encryptedType = "m.room.encrypted"; localEvent.encryptedContent = encryptedContent; + + // TODO: Specify this in the event constructor rather than fiddling + // with the event object internals. + localEvent.encrypted = true; } - // TODO: Specify this in the event constructor rather than fiddling - // with the event object internals. - localEvent.encrypted = true; } return _sendEvent(this, room, localEvent, callback);