feat: Upload keys on OKB reset
This does make the reset take longer on big accounts, but otherwise users might sign out before the keys are uploaded, which makes the reset more destructive than necessary. In the common case of not having any keys it shouldn't make a difference.
This commit is contained in:
parent
eb0759caf5
commit
a016709a40
|
|
@ -584,6 +584,8 @@ class Bootstrap {
|
||||||
Logs().v(
|
Logs().v(
|
||||||
'And finally set all megolm keys as needing to be uploaded again...');
|
'And finally set all megolm keys as needing to be uploaded again...');
|
||||||
await client.database?.markInboundGroupSessionsAsNeedingUpload();
|
await client.database?.markInboundGroupSessionsAsNeedingUpload();
|
||||||
|
Logs().v('And uploading keys...');
|
||||||
|
await client.encryption?.keyManager.backgroundTasks();
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
Logs().e('[Bootstrapping] Error setting up online key backup', e, s);
|
Logs().e('[Bootstrapping] Error setting up online key backup', e, s);
|
||||||
state = BootstrapState.error;
|
state = BootstrapState.error;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue