diff --git a/src/client.js b/src/client.js index 3a309fab6..e201197e2 100644 --- a/src/client.js +++ b/src/client.js @@ -3274,10 +3274,10 @@ function _resolve(callback, defer, res) { function _PojoToMatrixEventMapper(client) { function mapper(plainOldJsObject) { const event = new MatrixEvent(plainOldJsObject); - reEmit(client, event, [ - "Event.decrypted", - ]); if (event.isEncrypted()) { + reEmit(client, event, [ + "Event.decrypted", + ]); event.attemptDecryption(client._crypto); } return event;