diff --git a/lib/encryption/olm_manager.dart b/lib/encryption/olm_manager.dart index 52eca0f9..155be967 100644 --- a/lib/encryption/olm_manager.dart +++ b/lib/encryption/olm_manager.dart @@ -236,6 +236,8 @@ class OlmManager { if (updateDatabase) { await client.database?.updateClientKeys(pickledOlmAccount!); } + // Workaround: Make sure we stop if we got logged out in the meantime. + if (!client.isLogged()) return true; final response = await client.uploadKeys( deviceKeys: uploadDeviceKeys ? MatrixDeviceKeys.fromJson(keysContent['device_keys'])