From 6cc2a36ee1e57faaafa36c00df384ed22b0d7a04 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 2 Jun 2022 10:14:49 +0200 Subject: [PATCH] Add explicit Json names --- .../java/im/vector/app/core/pushers/UnifiedPushHelper.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/core/pushers/UnifiedPushHelper.kt b/vector/src/main/java/im/vector/app/core/pushers/UnifiedPushHelper.kt index 18fb28df7e..1f712fa1e0 100644 --- a/vector/src/main/java/im/vector/app/core/pushers/UnifiedPushHelper.kt +++ b/vector/src/main/java/im/vector/app/core/pushers/UnifiedPushHelper.kt @@ -20,6 +20,7 @@ import android.content.Context import android.content.pm.PackageManager import androidx.fragment.app.FragmentActivity import com.google.android.material.dialog.MaterialAlertDialogBuilder +import com.squareup.moshi.Json import com.squareup.moshi.JsonClass import im.vector.app.BuildConfig import im.vector.app.R @@ -153,12 +154,12 @@ class UnifiedPushHelper @Inject constructor( @JsonClass(generateAdapter = true) internal data class DiscoveryResponse( - val unifiedpush: DiscoveryUnifiedPush = DiscoveryUnifiedPush() + @Json(name = "unifiedpush") val unifiedpush: DiscoveryUnifiedPush = DiscoveryUnifiedPush() ) @JsonClass(generateAdapter = true) internal data class DiscoveryUnifiedPush( - val gateway: String = "" + @Json(name = "gateway") val gateway: String = "" ) suspend fun storeCustomOrDefaultGateway(