diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/widgets/token/GetScalarTokenTask.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/widgets/token/GetScalarTokenTask.kt index f6d1ecb23b..b1532df4f1 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/widgets/token/GetScalarTokenTask.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/widgets/token/GetScalarTokenTask.kt @@ -25,6 +25,7 @@ import im.vector.matrix.android.api.session.widgets.WidgetManagementFailure import im.vector.matrix.android.internal.session.widgets.WidgetsAPI import im.vector.matrix.android.internal.session.widgets.WidgetsAPIProvider import im.vector.matrix.android.internal.task.Task +import timber.log.Timber import javax.inject.Inject import javax.net.ssl.HttpsURLConnection @@ -67,8 +68,7 @@ internal class DefaultGetScalarTokenTask @Inject constructor(private val widgets throw IllegalStateException("Scalar token is null") } scalarTokenStore.setToken(serverUrl, registerWidgetResponse.scalarToken) - widgetsAPI.validateToken(registerWidgetResponse.scalarToken, WIDGET_API_VERSION) - return registerWidgetResponse.scalarToken + return validateToken(widgetsAPI,serverUrl, registerWidgetResponse.scalarToken) } private suspend fun validateToken(widgetsAPI: WidgetsAPI, serverUrl: String, scalarToken: String): String {