From 80ede4f4111df1379ba3270f1fdc038b6c1e0c27 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 4 Sep 2020 12:05:58 +0200 Subject: [PATCH] session will always be true here, we want to check sessionEntry --- src/matrix/e2ee/megolm/Encryption.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/e2ee/megolm/Encryption.js b/src/matrix/e2ee/megolm/Encryption.js index 0b374f48..e39280ea 100644 --- a/src/matrix/e2ee/megolm/Encryption.js +++ b/src/matrix/e2ee/megolm/Encryption.js @@ -42,7 +42,7 @@ export class Encryption { } if (!sessionEntry || this._needsToRotate(session, sessionEntry.createdAt, encryptionParams)) { // in the case of rotating, recreate a session as we already unpickled into it - if (session) { + if (sessionEntry) { session.free(); session = new this._olm.OutboundGroupSession(); }