forked from mystiq/hydrogen-web
only prompt after waiting 10s for sync UTD
This commit is contained in:
parent
0a83bf1176
commit
6cd227b82d
1 changed files with 5 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue