From ecc60efea9c56f2038edcd8a0d0f0e9b66f1f92e Mon Sep 17 00:00:00 2001 From: Krille Fear Date: Sat, 19 Feb 2022 13:36:56 +0100 Subject: [PATCH] fix: Change password using email authentication --- CHANGELOG.md | 3 +++ lib/src/client.dart | 5 ++--- pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e68978f..fd4659ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [0.8.11] - 19nd Feb 2022 +- fix: Change password using email authentication + ## [0.8.10] - 19nd Feb 2022 - chore: Increase default thumbnail size to 800 - fix: sortRooms should be triggered right before onSync is called diff --git a/lib/src/client.dart b/lib/src/client.dart index 4fd69839..d1dba62b 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -2232,9 +2232,8 @@ class Client extends MatrixApi { AuthenticationData? auth, bool? logoutDevices}) async { final userID = this.userID; - if (userID == null) return; try { - if (oldPassword != null) { + if (oldPassword != null && userID != null) { auth = AuthenticationPassword( identifier: AuthenticationUserIdentifier(user: userID), password: oldPassword, @@ -2252,7 +2251,7 @@ class Client extends MatrixApi { false)) { rethrow; } - if (oldPassword == null) { + if (oldPassword == null || userID == null) { rethrow; } return changePassword( diff --git a/pubspec.yaml b/pubspec.yaml index 228ef5d5..ea3f562e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: matrix description: Matrix Dart SDK -version: 0.8.10 +version: 0.8.11 homepage: https://famedly.com repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git