From f13fc98609ab199829cb6068b5e8aee76b2cad57 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Mon, 17 Feb 2020 18:10:53 +0100 Subject: [PATCH] [Client] Try again to upload keys --- lib/src/client.dart | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index f216fd50..3f280268 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -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; }