This commit is contained in:
Bruno Windels 2020-11-10 14:02:27 +01:00
parent fd498b3d24
commit 769feac73c

View file

@ -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();