need to pass in olm

This commit is contained in:
Bruno Windels 2020-09-02 14:52:19 +02:00
parent 1f66868566
commit 14cba7ec6e
2 changed files with 3 additions and 2 deletions

View file

@ -63,7 +63,7 @@ export class Session {
storage: this._storage, storage: this._storage,
olm: this._olm, 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}); this._deviceMessageHandler.enableEncryption({olmDecryption, megolmDecryption});
} }

View file

@ -16,8 +16,9 @@ limitations under the License.
// senderKey is a curve25519 key // senderKey is a curve25519 key
export class Decryption { export class Decryption {
constructor({pickleKey}) { constructor({pickleKey, olm}) {
this._pickleKey = pickleKey; this._pickleKey = pickleKey;
this._olm = olm;
} }
async addRoomKeys(payloads, txn) { async addRoomKeys(payloads, txn) {