fix: don't delete the dehydrated device before we are sure the keys got saved
This commit is contained in:
parent
2fca08725d
commit
52a5485f7a
|
|
@ -114,6 +114,12 @@ extension DehydratedDeviceHandler on Client {
|
|||
}
|
||||
} while (events.events?.isNotEmpty == true);
|
||||
|
||||
// make sure the sessions we just received get uploaded before we upload a new device (which deletes the old device).
|
||||
await this
|
||||
.encryption
|
||||
?.keyManager
|
||||
.uploadInboundGroupSessions(skipIfInProgress: false);
|
||||
|
||||
await _uploadNewDevice(secureStorage);
|
||||
} finally {
|
||||
await encryption.dispose();
|
||||
|
|
|
|||
Loading…
Reference in New Issue