From 0ee2769e157982632a1886215b8d30eaca623faa Mon Sep 17 00:00:00 2001 From: Diogo Date: Thu, 31 Oct 2024 10:49:04 +0000 Subject: [PATCH] fixed enum --- .../commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt index 791222825c..0e656a8d4f 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt @@ -4858,7 +4858,7 @@ class APIResponse(val resp: CR, val remoteHostId: Long?, val corr: String? = nul } else if (type == "apiChat") { val user: UserRef = json.decodeFromJsonElement(resp["user"]!!.jsonObject) val chat = parseChatData(resp["chat"]!!) - val section = resp["section"]?.jsonObject?.get("type")?.let { + val section = resp["section"]?.let { json.decodeFromJsonElement(it) } ?: ChatLandingSection.Latest return APIResponse(CR.ApiChat(user, chat, section), remoteHostId, corr)