diff --git a/src/matrix/e2ee/RoomEncryption.js b/src/matrix/e2ee/RoomEncryption.js index 87c64cbe..f0446f98 100644 --- a/src/matrix/e2ee/RoomEncryption.js +++ b/src/matrix/e2ee/RoomEncryption.js @@ -159,10 +159,6 @@ export class RoomEncryption { } async _requestMissingSessionFromBackup(senderKey, sessionId, source) { - if (!this._sessionBackup) { - this._notifyMissingMegolmSession(); - return; - } // if the message came from sync, wait 10s to see if the room key arrives, // and only after that proceed to request from backup if (source === DecryptionSource.Sync) { @@ -171,6 +167,11 @@ export class RoomEncryption { return; } } + // show prompt to enable secret storage + if (!this._sessionBackup) { + this._notifyMissingMegolmSession(); + return; + } try { const session = await this._sessionBackup.getSession(this._room.id, sessionId);