From cfe52a2888b1231f687e4d09420263eab7a96725 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Fri, 15 Jun 2018 15:13:59 +0100 Subject: [PATCH] Instead of passing dft.eventDecrypted, call it instead So that `this` has the correct reference. --- src/components/structures/MatrixChat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 7884829a76..2a2fee1a21 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -1318,7 +1318,7 @@ export default React.createClass({ // When logging out, stop tracking failures and destroy state cli.on("Session.logged_out", stopDft); - cli.on("Event.decrypted", dft.eventDecrypted); + cli.on("Event.decrypted", (e) => dft.eventDecrypted(e)); const krh = new KeyRequestHandler(cli); cli.on("crypto.roomKeyRequest", (req) => {