mirror of
				https://github.com/InsanusMokrassar/TelegramBotAPI.git
				synced 2025-11-03 21:50:13 +00:00 
			
		
		
		
	changelog fill and callback query improvements
This commit is contained in:
		@@ -1,5 +1,13 @@
 | 
				
			|||||||
# TelegramBotAPI changelog
 | 
					# TelegramBotAPI changelog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 5.2.1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* `Core`:
 | 
				
			||||||
 | 
					    * All the `CallbackQuery`es now will receive `CommonUser` instead of `User` due inability of bots to trigger any
 | 
				
			||||||
 | 
					      inline interaction with others bots
 | 
				
			||||||
 | 
					* `API`:
 | 
				
			||||||
 | 
					    * Now `sentMessageFlow` will take each sent message in `handleLiveLocation`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 5.2.0
 | 
					## 5.2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* `Versions`:
 | 
					* `Versions`:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,16 +2,18 @@ package dev.inmo.tgbotapi.types.queries.callback
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import dev.inmo.tgbotapi.abstracts.FromUser
 | 
					import dev.inmo.tgbotapi.abstracts.FromUser
 | 
				
			||||||
import dev.inmo.tgbotapi.types.CallbackQueryIdentifier
 | 
					import dev.inmo.tgbotapi.types.CallbackQueryIdentifier
 | 
				
			||||||
 | 
					import dev.inmo.tgbotapi.types.chat.CommonUser
 | 
				
			||||||
import dev.inmo.tgbotapi.types.chat.User
 | 
					import dev.inmo.tgbotapi.types.chat.User
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sealed interface CallbackQuery : FromUser {
 | 
					sealed interface CallbackQuery : FromUser {
 | 
				
			||||||
    val id: CallbackQueryIdentifier
 | 
					    val id: CallbackQueryIdentifier
 | 
				
			||||||
    val chatInstance: String
 | 
					    val chatInstance: String
 | 
				
			||||||
 | 
					    override val from: CommonUser
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
data class UnknownCallbackQueryType(
 | 
					data class UnknownCallbackQueryType(
 | 
				
			||||||
    override val id: CallbackQueryIdentifier,
 | 
					    override val id: CallbackQueryIdentifier,
 | 
				
			||||||
    override val from: User,
 | 
					    override val from: CommonUser,
 | 
				
			||||||
    override val chatInstance: String,
 | 
					    override val chatInstance: String,
 | 
				
			||||||
    val raw: String
 | 
					    val raw: String
 | 
				
			||||||
) : CallbackQuery
 | 
					) : CallbackQuery
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,11 +1,14 @@
 | 
				
			|||||||
package dev.inmo.tgbotapi.types.queries.callback
 | 
					package dev.inmo.tgbotapi.types.queries.callback
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import dev.inmo.tgbotapi.types.*
 | 
					import dev.inmo.tgbotapi.types.*
 | 
				
			||||||
 | 
					import dev.inmo.tgbotapi.types.chat.CommonUser
 | 
				
			||||||
import dev.inmo.tgbotapi.types.chat.User
 | 
					import dev.inmo.tgbotapi.types.chat.User
 | 
				
			||||||
 | 
					import kotlinx.serialization.Serializable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Serializable
 | 
				
			||||||
data class InlineMessageIdDataCallbackQuery(
 | 
					data class InlineMessageIdDataCallbackQuery(
 | 
				
			||||||
    override val id: CallbackQueryIdentifier,
 | 
					    override val id: CallbackQueryIdentifier,
 | 
				
			||||||
    override val from: User,
 | 
					    override val from: CommonUser,
 | 
				
			||||||
    override val chatInstance: String,
 | 
					    override val chatInstance: String,
 | 
				
			||||||
    override val inlineMessageId: InlineMessageIdentifier,
 | 
					    override val inlineMessageId: InlineMessageIdentifier,
 | 
				
			||||||
    override val data: String
 | 
					    override val data: String
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,11 +1,12 @@
 | 
				
			|||||||
package dev.inmo.tgbotapi.types.queries.callback
 | 
					package dev.inmo.tgbotapi.types.queries.callback
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import dev.inmo.tgbotapi.types.*
 | 
					import dev.inmo.tgbotapi.types.*
 | 
				
			||||||
 | 
					import dev.inmo.tgbotapi.types.chat.CommonUser
 | 
				
			||||||
import dev.inmo.tgbotapi.types.chat.User
 | 
					import dev.inmo.tgbotapi.types.chat.User
 | 
				
			||||||
 | 
					
 | 
				
			||||||
data class InlineMessageIdGameShortNameCallbackQuery(
 | 
					data class InlineMessageIdGameShortNameCallbackQuery(
 | 
				
			||||||
    override val id: CallbackQueryIdentifier,
 | 
					    override val id: CallbackQueryIdentifier,
 | 
				
			||||||
    override val from: User,
 | 
					    override val from: CommonUser,
 | 
				
			||||||
    override val chatInstance: String,
 | 
					    override val chatInstance: String,
 | 
				
			||||||
    override val inlineMessageId: InlineMessageIdentifier,
 | 
					    override val inlineMessageId: InlineMessageIdentifier,
 | 
				
			||||||
    override val gameShortName: String
 | 
					    override val gameShortName: String
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,13 +1,14 @@
 | 
				
			|||||||
package dev.inmo.tgbotapi.types.queries.callback
 | 
					package dev.inmo.tgbotapi.types.queries.callback
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import dev.inmo.tgbotapi.types.CallbackQueryIdentifier
 | 
					import dev.inmo.tgbotapi.types.CallbackQueryIdentifier
 | 
				
			||||||
 | 
					import dev.inmo.tgbotapi.types.chat.CommonUser
 | 
				
			||||||
import dev.inmo.tgbotapi.types.chat.User
 | 
					import dev.inmo.tgbotapi.types.chat.User
 | 
				
			||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
 | 
					import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
 | 
				
			||||||
import dev.inmo.tgbotapi.types.message.content.MessageContent
 | 
					import dev.inmo.tgbotapi.types.message.content.MessageContent
 | 
				
			||||||
 | 
					
 | 
				
			||||||
data class MessageDataCallbackQuery(
 | 
					data class MessageDataCallbackQuery(
 | 
				
			||||||
    override val id: CallbackQueryIdentifier,
 | 
					    override val id: CallbackQueryIdentifier,
 | 
				
			||||||
    override val from: User,
 | 
					    override val from: CommonUser,
 | 
				
			||||||
    override val chatInstance: String,
 | 
					    override val chatInstance: String,
 | 
				
			||||||
    override val message: ContentMessage<MessageContent>,
 | 
					    override val message: ContentMessage<MessageContent>,
 | 
				
			||||||
    override val data: String
 | 
					    override val data: String
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,13 +1,14 @@
 | 
				
			|||||||
package dev.inmo.tgbotapi.types.queries.callback
 | 
					package dev.inmo.tgbotapi.types.queries.callback
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import dev.inmo.tgbotapi.types.CallbackQueryIdentifier
 | 
					import dev.inmo.tgbotapi.types.CallbackQueryIdentifier
 | 
				
			||||||
 | 
					import dev.inmo.tgbotapi.types.chat.CommonUser
 | 
				
			||||||
import dev.inmo.tgbotapi.types.chat.User
 | 
					import dev.inmo.tgbotapi.types.chat.User
 | 
				
			||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
 | 
					import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
 | 
				
			||||||
import dev.inmo.tgbotapi.types.message.content.MessageContent
 | 
					import dev.inmo.tgbotapi.types.message.content.MessageContent
 | 
				
			||||||
 | 
					
 | 
				
			||||||
data class MessageGameShortNameCallbackQuery(
 | 
					data class MessageGameShortNameCallbackQuery(
 | 
				
			||||||
    override val id: CallbackQueryIdentifier,
 | 
					    override val id: CallbackQueryIdentifier,
 | 
				
			||||||
    override val from: User,
 | 
					    override val from: CommonUser,
 | 
				
			||||||
    override val chatInstance: String,
 | 
					    override val chatInstance: String,
 | 
				
			||||||
    override val message: ContentMessage<MessageContent>,
 | 
					    override val message: ContentMessage<MessageContent>,
 | 
				
			||||||
    override val gameShortName: String
 | 
					    override val gameShortName: String
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,7 @@
 | 
				
			|||||||
package dev.inmo.tgbotapi.types.queries.callback
 | 
					package dev.inmo.tgbotapi.types.queries.callback
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import dev.inmo.tgbotapi.types.*
 | 
					import dev.inmo.tgbotapi.types.*
 | 
				
			||||||
 | 
					import dev.inmo.tgbotapi.types.chat.CommonUser
 | 
				
			||||||
import dev.inmo.tgbotapi.types.chat.User
 | 
					import dev.inmo.tgbotapi.types.chat.User
 | 
				
			||||||
import dev.inmo.tgbotapi.types.message.abstracts.*
 | 
					import dev.inmo.tgbotapi.types.message.abstracts.*
 | 
				
			||||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer
 | 
					import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer
 | 
				
			||||||
@@ -13,7 +14,7 @@ internal data class RawCallbackQuery(
 | 
				
			|||||||
    @SerialName(idField)
 | 
					    @SerialName(idField)
 | 
				
			||||||
    val id: CallbackQueryIdentifier,
 | 
					    val id: CallbackQueryIdentifier,
 | 
				
			||||||
    @SerialName(fromField)
 | 
					    @SerialName(fromField)
 | 
				
			||||||
    val from: User,
 | 
					    val from: CommonUser,
 | 
				
			||||||
    @Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
 | 
					    @Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
 | 
				
			||||||
    val message: ContentMessage<MessageContent>? = null,
 | 
					    val message: ContentMessage<MessageContent>? = null,
 | 
				
			||||||
    @SerialName(inlineMessageIdField)
 | 
					    @SerialName(inlineMessageIdField)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user