From 769feac73c060313c3446194ecce694c20b62ba3 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 10 Nov 2020 14:02:27 +0100 Subject: [PATCH] cleanup --- src/matrix/e2ee/RoomEncryption.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/e2ee/RoomEncryption.js b/src/matrix/e2ee/RoomEncryption.js index 86c07606..54042bbd 100644 --- a/src/matrix/e2ee/RoomEncryption.js +++ b/src/matrix/e2ee/RoomEncryption.js @@ -253,7 +253,7 @@ export class RoomEncryption { /** shares the encryption key for the next message if needed */ async ensureMessageKeyIsShared(hsApi) { - if (this._lastKeyPreShareTime && this._lastKeyPreShareTime.measure() < MIN_PRESHARE_INTERVAL) { + if (this._lastKeyPreShareTime?.measure() < MIN_PRESHARE_INTERVAL) { return; } this._lastKeyPreShareTime = this._clock.createMeasure();