Merge branch 'client-fix-upload-keys-try-again' into 'master'

[Client] Try again to upload keys

See merge request famedly/famedlysdk!196
This commit is contained in:
Christian Pauly 2020-02-17 17:15:49 +00:00
commit bf23664ccd

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;
}