[Client] Try again to upload keys
This commit is contained in:
parent
d6e5937066
commit
f13fc98609
|
@ -299,9 +299,6 @@ class Client {
|
||||||
newDeviceID: response["device_id"],
|
newDeviceID: response["device_id"],
|
||||||
newMatrixVersions: matrixVersions,
|
newMatrixVersions: matrixVersions,
|
||||||
newLazyLoadMembers: lazyLoadMembers);
|
newLazyLoadMembers: lazyLoadMembers);
|
||||||
if (await this._uploadKeys(uploadDeviceKeys: true) == false) {
|
|
||||||
await this.logout();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
@ -345,10 +342,6 @@ class Client {
|
||||||
newMatrixVersions: matrixVersions,
|
newMatrixVersions: matrixVersions,
|
||||||
newLazyLoadMembers: lazyLoadMembers,
|
newLazyLoadMembers: lazyLoadMembers,
|
||||||
);
|
);
|
||||||
if (await this._uploadKeys(uploadDeviceKeys: true) == false) {
|
|
||||||
await this.logout();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -691,6 +684,9 @@ class Client {
|
||||||
await olm.init();
|
await olm.init();
|
||||||
this._olmAccount = olm.Account();
|
this._olmAccount = olm.Account();
|
||||||
this._olmAccount.create();
|
this._olmAccount.create();
|
||||||
|
if (await this._uploadKeys(uploadDeviceKeys: true) == false) {
|
||||||
|
throw ("Upload key failed");
|
||||||
|
}
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
this._olmAccount = null;
|
this._olmAccount = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue