1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 16:23:48 +00:00

remove FromUser interface from RawChosenInlineResult

This commit is contained in:
vasya 2021-06-29 21:06:46 +03:00
parent 12a35da4b6
commit 38826a5e7e

View File

@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult
import dev.inmo.tgbotapi.CommonAbstracts.FromUser
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.InlineQueries.abstracts.ChosenInlineResult
import dev.inmo.tgbotapi.types.location.StaticLocation
@ -12,14 +11,14 @@ internal data class RawChosenInlineResult(
@SerialName(resultIdField)
val resultId: InlineQueryIdentifier, //chosen temporary, can be changed
@SerialName(fromField)
override val user: User,
val user: User,
@SerialName(queryField)
val query: String,
@SerialName(locationField)
val location: StaticLocation? = null,
@SerialName(inlineMessageIdField)
val inlineMessageId: InlineMessageIdentifier? = null
) : FromUser {
) {
val asChosenInlineResult: ChosenInlineResult by lazy {
location ?.let {
LocationChosenInlineResult(resultId, user, location, inlineMessageId, query)