mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-25 19:48:43 +00:00
commit
6532bf255b
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,5 +1,15 @@
|
||||
# TelegramBotAPI changelog
|
||||
|
||||
## 6.0.3
|
||||
|
||||
* `Versions`:
|
||||
* `MicroUtils`: `0.17.1` -> `0.17.2`
|
||||
* `Core`:
|
||||
* `User` in `CallbackQuery` now is `CommonUser` as well as in `from`
|
||||
* `User` in `InlineQuery` now is `CommonUser` as well as in `from`
|
||||
* `BehaviourBuilder`:
|
||||
* Fixes in `DeepLink` triggers and waiters
|
||||
|
||||
## 6.0.2
|
||||
|
||||
* `Core`:
|
||||
|
@ -6,4 +6,4 @@ kotlin.incremental=true
|
||||
kotlin.incremental.js=true
|
||||
|
||||
library_group=dev.inmo
|
||||
library_version=6.0.2
|
||||
library_version=6.0.3
|
||||
|
@ -13,7 +13,7 @@ ktor = "2.2.4"
|
||||
ksp = "1.8.10-1.0.9"
|
||||
kotlin-poet = "1.12.0"
|
||||
|
||||
microutils = "0.17.1"
|
||||
microutils = "0.17.2"
|
||||
|
||||
github-release-plugin = "2.4.1"
|
||||
dokka = "1.7.20"
|
||||
|
@ -38,7 +38,7 @@ suspend fun <BC : BehaviourContext> BC.onDeepLink(
|
||||
scenarioReceiver,
|
||||
) {
|
||||
(it.messageUpdateOrNull()) ?.data ?.commonMessageOrNull() ?.withContentOrNull<TextContent>() ?.let { message ->
|
||||
message to message.content.textSources[1].source.removePrefix(" ").decodeURLQueryComponent()
|
||||
message to (message.content.textSources.getOrNull(1) ?.source ?.removePrefix(" ") ?.decodeURLQueryComponent() ?: return@let null)
|
||||
} ?.let(::listOfNotNull)
|
||||
}.also {
|
||||
triggersHolder.handleableCommandsHolder.registerHandleable(startRegex)
|
||||
|
@ -3,10 +3,11 @@ package dev.inmo.tgbotapi.types.InlineQueries.query
|
||||
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.chat.ChatType
|
||||
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||
|
||||
data class BaseInlineQuery(
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val from: User,
|
||||
override val from: CommonUser,
|
||||
override val query: String,
|
||||
override val offset: String,
|
||||
override val chatType: ChatType?
|
||||
|
@ -3,10 +3,16 @@ package dev.inmo.tgbotapi.types.InlineQueries.query
|
||||
import dev.inmo.tgbotapi.abstracts.FromUser
|
||||
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.ChatType
|
||||
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
|
||||
sealed interface InlineQuery : FromUser {
|
||||
val id: InlineQueryIdentifier
|
||||
val query: String
|
||||
val offset: String
|
||||
val chatType: ChatType?
|
||||
|
||||
override val from: CommonUser
|
||||
override val user: CommonUser
|
||||
get() = from
|
||||
}
|
||||
|
@ -3,11 +3,12 @@ package dev.inmo.tgbotapi.types.InlineQueries.query
|
||||
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.chat.ChatType
|
||||
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||
import dev.inmo.tgbotapi.types.location.Location
|
||||
|
||||
data class LocationInlineQuery(
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val from: User,
|
||||
override val from: CommonUser,
|
||||
override val query: String,
|
||||
override val offset: String,
|
||||
override val chatType: ChatType?,
|
||||
|
@ -12,7 +12,7 @@ internal data class RawInlineQuery(
|
||||
@SerialName(idField)
|
||||
val id: InlineQueryIdentifier,
|
||||
@SerialName(fromField)
|
||||
val from: User,
|
||||
val from: CommonUser,
|
||||
@SerialName(queryField)
|
||||
val query: String,
|
||||
@SerialName(offsetField)
|
||||
|
@ -9,6 +9,8 @@ sealed interface CallbackQuery : FromUser {
|
||||
val id: CallbackQueryIdentifier
|
||||
val chatInstance: String
|
||||
override val from: CommonUser
|
||||
override val user: CommonUser
|
||||
get() = from
|
||||
}
|
||||
|
||||
data class UnknownCallbackQueryType(
|
||||
|
Loading…
Reference in New Issue
Block a user