mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
only prompt after waiting 10s for sync UTD
This commit is contained in:
parent
0a83bf1176
commit
6cd227b82d
@ -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 New Issue
Block a user