From f8be8140790757ee7b1ada14ac5175e108503e1b Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 20 Apr 2021 10:49:47 +0200 Subject: [PATCH] RegistrationWizard.createAccount() parameters are now all optional, following Matrix spec (#3205) --- CHANGES.md | 2 +- .../android/sdk/api/auth/registration/RegistrationWizard.kt | 4 +++- .../internal/auth/registration/DefaultRegistrationWizard.kt | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 57582d884a..c9b155f7ad 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,7 +14,7 @@ Translations 🗣: - SDK API changes ⚠️: - - + - RegistrationWizard.createAccount() parameters are now all optional, following Matrix spec (#3205) Build 🧱: - Upgrade to gradle 7 diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/registration/RegistrationWizard.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/registration/RegistrationWizard.kt index 38a5a77291..f059bf26c4 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/registration/RegistrationWizard.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/registration/RegistrationWizard.kt @@ -20,7 +20,9 @@ interface RegistrationWizard { suspend fun getRegistrationFlow(): RegistrationResult - suspend fun createAccount(userName: String, password: String, initialDeviceDisplayName: String?): RegistrationResult + suspend fun createAccount(userName: String?, + password: String?, + initialDeviceDisplayName: String?): RegistrationResult suspend fun performReCaptcha(response: String): RegistrationResult diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/DefaultRegistrationWizard.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/DefaultRegistrationWizard.kt index 4a3d53a8fc..4a156e74cd 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/DefaultRegistrationWizard.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/DefaultRegistrationWizard.kt @@ -66,8 +66,8 @@ internal class DefaultRegistrationWizard( return performRegistrationRequest(params) } - override suspend fun createAccount(userName: String, - password: String, + override suspend fun createAccount(userName: String?, + password: String?, initialDeviceDisplayName: String?): RegistrationResult { val params = RegistrationParams( username = userName,