mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-22 16:47:13 +00:00
MessageCallbackQuery#message now is ContentMessage<MessageContent>
This commit is contained in:
parent
fbed81a1b3
commit
e1c94f772d
@ -2,6 +2,9 @@
|
||||
|
||||
## 0.38.1
|
||||
|
||||
* `Core`:
|
||||
* `MessageCallbackQuery` (and all implementers as well) has changed the type of `message`: now it is `ContentMessage<MessageContent>` instead of `Message`
|
||||
|
||||
## 0.38.0
|
||||
|
||||
_This update contains [Telegram Bot API 5.6](https://core.telegram.org/bots/api-changelog#december-30-2021) implementation_
|
||||
|
@ -1,7 +1,8 @@
|
||||
package dev.inmo.tgbotapi.types.CallbackQuery
|
||||
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
|
||||
|
||||
sealed interface MessageCallbackQuery : CallbackQuery {
|
||||
val message: Message
|
||||
val message: ContentMessage<MessageContent>
|
||||
}
|
||||
|
@ -2,12 +2,13 @@ package dev.inmo.tgbotapi.types.CallbackQuery
|
||||
|
||||
import dev.inmo.tgbotapi.types.CallbackQueryIdentifier
|
||||
import dev.inmo.tgbotapi.types.User
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
|
||||
|
||||
data class MessageDataCallbackQuery(
|
||||
override val id: CallbackQueryIdentifier,
|
||||
override val from: User,
|
||||
override val chatInstance: String,
|
||||
override val message: Message,
|
||||
override val message: ContentMessage<MessageContent>,
|
||||
override val data: String
|
||||
) : DataCallbackQuery, MessageCallbackQuery
|
||||
|
@ -1,8 +1,9 @@
|
||||
package dev.inmo.tgbotapi.types.CallbackQuery
|
||||
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.*
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer
|
||||
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@ -13,7 +14,7 @@ internal data class RawCallbackQuery(
|
||||
@SerialName(fromField)
|
||||
val from: User,
|
||||
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
|
||||
val message: Message? = null,
|
||||
val message: ContentMessage<MessageContent>? = null,
|
||||
@SerialName(inlineMessageIdField)
|
||||
val inlineMessageId: InlineMessageIdentifier? = null,
|
||||
@SerialName("chat_instance")
|
||||
|
Loading…
Reference in New Issue
Block a user