[Client] Try again to upload keys

This commit is contained in:
Christian Pauly 2020-02-17 18:10:53 +01:00
parent d6e5937066
commit f13fc98609
1 changed files with 3 additions and 7 deletions

View File

@ -299,9 +299,6 @@ class Client {
newDeviceID: response["device_id"],
newMatrixVersions: matrixVersions,
newLazyLoadMembers: lazyLoadMembers);
if (await this._uploadKeys(uploadDeviceKeys: true) == false) {
await this.logout();
}
}
return response;
}
@ -345,10 +342,6 @@ class Client {
newMatrixVersions: matrixVersions,
newLazyLoadMembers: lazyLoadMembers,
);
if (await this._uploadKeys(uploadDeviceKeys: true) == false) {
await this.logout();
return false;
}
return true;
}
return false;
@ -691,6 +684,9 @@ class Client {
await olm.init();
this._olmAccount = olm.Account();
this._olmAccount.create();
if (await this._uploadKeys(uploadDeviceKeys: true) == false) {
throw ("Upload key failed");
}
} catch (_) {
this._olmAccount = null;
}