From 8d04f8b8b583f9350012e500f25b133d0dce7718 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 24 Aug 2017 11:29:48 +0100 Subject: [PATCH] Re-emit events from, er, Event objects We do create Events in more places, but this is probably the only place that matters since the only event is 'decrypted' which won't fire for, eg. events we send. --- src/client.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client.js b/src/client.js index 5f7a542de..bf51a4cd2 100644 --- a/src/client.js +++ b/src/client.js @@ -3241,6 +3241,9 @@ function _resolve(callback, defer, res) { function _PojoToMatrixEventMapper(client) { function mapper(plainOldJsObject) { const event = new MatrixEvent(plainOldJsObject); + reEmit(client, event, [ + "Event.decrypted", + ]); if (event.isEncrypted()) { event.attemptDecryption(client._crypto); }