From 14cba7ec6e296cf49a510dbada01e0433fb7fa42 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 2 Sep 2020 14:52:19 +0200 Subject: [PATCH] need to pass in olm --- src/matrix/Session.js | 2 +- src/matrix/e2ee/megolm/Decryption.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/matrix/Session.js b/src/matrix/Session.js index 18a0af2c..e07d0d03 100644 --- a/src/matrix/Session.js +++ b/src/matrix/Session.js @@ -63,7 +63,7 @@ export class Session { storage: this._storage, olm: this._olm, }); - const megolmDecryption = new MegOlmDecryption({pickleKey: PICKLE_KEY}); + const megolmDecryption = new MegOlmDecryption({pickleKey: PICKLE_KEY, olm: this._olm}); this._deviceMessageHandler.enableEncryption({olmDecryption, megolmDecryption}); } diff --git a/src/matrix/e2ee/megolm/Decryption.js b/src/matrix/e2ee/megolm/Decryption.js index 1627564d..94b3ed10 100644 --- a/src/matrix/e2ee/megolm/Decryption.js +++ b/src/matrix/e2ee/megolm/Decryption.js @@ -16,8 +16,9 @@ limitations under the License. // senderKey is a curve25519 key export class Decryption { - constructor({pickleKey}) { + constructor({pickleKey, olm}) { this._pickleKey = pickleKey; + this._olm = olm; } async addRoomKeys(payloads, txn) {