From 18359fedb37b1984786db469e3dea2d1b60cabcb Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 12 Jan 2022 18:06:32 +0100 Subject: [PATCH] Fix #4919 --- changelog.d/4935.bugfix | 1 + .../android/sdk/internal/session/terms/DefaultTermsService.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/4935.bugfix diff --git a/changelog.d/4935.bugfix b/changelog.d/4935.bugfix new file mode 100644 index 0000000000..18967ed4a5 --- /dev/null +++ b/changelog.d/4935.bugfix @@ -0,0 +1 @@ +Fix a wrong network error issue in the Legals screen \ No newline at end of file diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/terms/DefaultTermsService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/terms/DefaultTermsService.kt index 313fb6319d..6205e3e4b1 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/terms/DefaultTermsService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/terms/DefaultTermsService.kt @@ -64,7 +64,7 @@ internal class DefaultTermsService @Inject constructor( */ override suspend fun getHomeserverTerms(baseUrl: String): TermsResponse { return try { - val request = baseUrl + NetworkConstants.URI_API_PREFIX_PATH_R0 + "register" + val request = baseUrl.ensureTrailingSlash() + NetworkConstants.URI_API_PREFIX_PATH_R0 + "register" executeRequest(null) { termsAPI.register(request) }