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