1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-23 00:57:13 +00:00

remove usages of deprecated ChosenInlineResult

This commit is contained in:
InsanusMokrassar 2021-06-29 11:55:46 +06:00
parent 067e36adc6
commit b2915857d7
2 changed files with 3 additions and 4 deletions

View File

@ -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)
}

View File

@ -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
) : Update