mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
upfixes
This commit is contained in:
parent
6ba9a31fb9
commit
4f920abb61
@ -11,6 +11,7 @@
|
||||
* New extensions `TextSourcesList#make*String` for all parse modes
|
||||
* All `MessageContent` subclasses now serializable
|
||||
* `ChosenInlineResult` was replaced and modified to be sealed
|
||||
* `ChosenInlineResult` now extends `FromUser`
|
||||
* Added `Update#sourceUser` method
|
||||
* More types assumed as sent by user types now implements `FromUser` interface
|
||||
* Added `Any#whenFromUser`, `Any#asFromUser` and`Any#requireFromUser` extensions
|
||||
|
@ -1,9 +1,13 @@
|
||||
package dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult
|
||||
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class BaseChosenInlineResult(
|
||||
override val resultId: InlineQueryIdentifier,
|
||||
@SerialName(fromField)
|
||||
override val user: User,
|
||||
override val inlineMessageId: InlineMessageIdentifier?,
|
||||
override val query: String
|
||||
|
@ -1,10 +1,10 @@
|
||||
package dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult
|
||||
|
||||
import dev.inmo.tgbotapi.CommonAbstracts.FromUser
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
|
||||
sealed interface ChosenInlineResult {
|
||||
sealed interface ChosenInlineResult : FromUser {
|
||||
val resultId: InlineQueryIdentifier //chosen temporary, can be changed
|
||||
val user: User
|
||||
val inlineMessageId: InlineMessageIdentifier?
|
||||
val query: String
|
||||
}
|
||||
|
@ -2,9 +2,13 @@ package dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult
|
||||
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.location.StaticLocation
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class LocationChosenInlineResult(
|
||||
override val resultId: InlineQueryIdentifier,
|
||||
@SerialName(fromField)
|
||||
override val user: User,
|
||||
val location: StaticLocation,
|
||||
override val inlineMessageId: InlineMessageIdentifier?,
|
||||
|
Loading…
Reference in New Issue
Block a user