From 497f422b2b6c0ebc62d87115a6691c5956491890 Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 19 Jul 2024 12:56:58 +0200 Subject: [PATCH] Authenticated media : fix pr remarks --- .../GetHomeServerCapabilitiesTask.kt | 23 ++++++++++++------- .../DefaultIsAuthenticatedMediaSupported.kt | 1 - .../session/media/GetRawPreviewUrlTask.kt | 4 ++-- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/homeserver/GetHomeServerCapabilitiesTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/homeserver/GetHomeServerCapabilitiesTask.kt index 2a74cdf198..5314237c3c 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/homeserver/GetHomeServerCapabilitiesTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/homeserver/GetHomeServerCapabilitiesTask.kt @@ -20,6 +20,7 @@ import com.zhuinden.monarchy.Monarchy import org.matrix.android.sdk.api.MatrixPatterns.getServerName import org.matrix.android.sdk.api.auth.data.HomeServerConnectionConfig import org.matrix.android.sdk.api.auth.wellknown.WellknownResult +import org.matrix.android.sdk.api.extensions.orFalse import org.matrix.android.sdk.api.extensions.orTrue import org.matrix.android.sdk.api.session.homeserver.HomeServerCapabilities import org.matrix.android.sdk.internal.auth.version.Versions @@ -39,8 +40,9 @@ import org.matrix.android.sdk.internal.di.UserId import org.matrix.android.sdk.internal.network.GlobalErrorReceiver import org.matrix.android.sdk.internal.network.executeRequest import org.matrix.android.sdk.internal.session.integrationmanager.IntegrationManagerConfigExtractor +import org.matrix.android.sdk.internal.session.media.AuthenticatedMediaAPI import org.matrix.android.sdk.internal.session.media.GetMediaConfigResult -import org.matrix.android.sdk.internal.session.media.MediaAPIProvider +import org.matrix.android.sdk.internal.session.media.UnauthenticatedMediaAPI import org.matrix.android.sdk.internal.task.Task import org.matrix.android.sdk.internal.util.awaitTransaction import org.matrix.android.sdk.internal.wellknown.GetWellknownTask @@ -56,7 +58,8 @@ internal interface GetHomeServerCapabilitiesTask : Task) { - Timber.d("HomeServerCapabilitiesEntity updated.") canUseAuthenticatedMedia = results.canUseAuthenticatedMedia() Timber.d("canUseAuthenticatedMedia: $canUseAuthenticatedMedia") } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/media/GetRawPreviewUrlTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/media/GetRawPreviewUrlTask.kt index 631d2fe6aa..bf0953522b 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/media/GetRawPreviewUrlTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/media/GetRawPreviewUrlTask.kt @@ -30,13 +30,13 @@ internal interface GetRawPreviewUrlTask : Task