From b2915857d7454510c34be9b72b7dd496d992731c Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 29 Jun 2021 11:55:46 +0600 Subject: [PATCH] remove usages of deprecated ChosenInlineResult --- .../InlineQueries/ChosenInlineResult/RawChosenInlineResult.kt | 3 +-- .../inmo/tgbotapi/types/update/ChosenInlineResultUpdate.kt | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/RawChosenInlineResult.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/RawChosenInlineResult.kt index 4db078be40..0bdfedfe6c 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/RawChosenInlineResult.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/RawChosenInlineResult.kt @@ -1,7 +1,6 @@ package dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult import dev.inmo.tgbotapi.types.* -import dev.inmo.tgbotapi.types.InlineQueries.abstracts.ChosenInlineResult import dev.inmo.tgbotapi.types.location.StaticLocation import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @@ -20,7 +19,7 @@ internal data class RawChosenInlineResult( val inlineMessageId: InlineMessageIdentifier? = null ) { val asChosenInlineResult: ChosenInlineResult by lazy { - location ?.let { + location?.let { LocationChosenInlineResult(resultId, user, location, inlineMessageId, query) } ?: BaseChosenInlineResult(resultId, user, inlineMessageId, query) } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate.kt index 8aa0d1e825..1f10df9add 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate.kt @@ -1,10 +1,10 @@ package dev.inmo.tgbotapi.types.update -import dev.inmo.tgbotapi.types.InlineQueries.abstracts.ChosenInlineResult +import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.ChosenInlineResult import dev.inmo.tgbotapi.types.UpdateIdentifier import dev.inmo.tgbotapi.types.update.abstracts.Update data class ChosenInlineResultUpdate( override val updateId: UpdateIdentifier, override val data: ChosenInlineResult -) : Update \ No newline at end of file +) : Update