From ee4c54aa27df00313eacc0f96780619b90b862af Mon Sep 17 00:00:00 2001 From: greenart7c3 <115044884+greenart7c3@users.noreply.github.com> Date: Wed, 10 May 2023 14:47:46 -0300 Subject: [PATCH] use httpclient.getHttpClient --- .../amethyst/service/notifications/RegisterAccounts.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/service/notifications/RegisterAccounts.kt b/app/src/main/java/com/vitorpamplona/amethyst/service/notifications/RegisterAccounts.kt index d3cb9d0c5..f3772e3e4 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/service/notifications/RegisterAccounts.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/service/notifications/RegisterAccounts.kt @@ -4,13 +4,13 @@ import android.util.Log import com.vitorpamplona.amethyst.AccountInfo import com.vitorpamplona.amethyst.BuildConfig import com.vitorpamplona.amethyst.LocalPreferences +import com.vitorpamplona.amethyst.service.HttpClient import com.vitorpamplona.amethyst.service.model.RelayAuthEvent import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Job import kotlinx.coroutines.launch import okhttp3.MediaType.Companion.toMediaType -import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody @@ -54,7 +54,7 @@ class RegisterAccounts( .post(body) .build() - val client = OkHttpClient.Builder().build() + val client = HttpClient.getHttpClient() client.newCall(request).execute() } catch (e: java.lang.Exception) {