1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-26 18:47:14 +00:00

Merge pull request #276 from InsanusMokrassar/0.32.2

0.32.2
This commit is contained in:
InsanusMokrassar 2021-02-01 21:43:21 +06:00 committed by GitHub
commit 128b782a27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 8 deletions

View File

@ -1,5 +1,10 @@
# TelegramBotAPI changelog
## 0.32.2
* `Core`:
* Fix of [#275](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/275)
## 0.32.1
* `Core`:

View File

@ -17,6 +17,6 @@ micro_utils_version=0.4.23
javax_activation_version=1.1.1
library_group=dev.inmo
library_version=0.32.1
library_version=0.32.2
github_release_plugin_version=2.2.12

View File

@ -10,6 +10,7 @@ import dev.inmo.tgbotapi.utils.throwRangeError
import kotlinx.serialization.*
private val commonResultDeserializer = TelegramBotAPIMessageDeserializationStrategyClass<ContentMessage<LocationContent>>()
const val editMessageLiveLocationMethod = "editMessageLiveLocation"
@Serializable
data class EditChatMessageLiveLocation(
@ -30,7 +31,7 @@ data class EditChatMessageLiveLocation(
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditChatMessage<LocationContent>, EditReplyMessage, EditLocationMessage {
override fun method(): String = "editMessageLiveLocation"
override fun method(): String = editMessageLiveLocationMethod
override val resultDeserializer: DeserializationStrategy<ContentMessage<LocationContent>>
get() = commonResultDeserializer
override val requestSerializer: SerializationStrategy<*>

View File

@ -23,7 +23,7 @@ data class EditInlineMessageLiveLocation(
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditInlineMessage, EditReplyMessage, EditLocationMessage {
override fun method(): String = "editMessageLiveLocation"
override fun method(): String = editMessageLiveLocationMethod
override val requestSerializer: SerializationStrategy<*>
get() = serializer()

View File

@ -10,6 +10,7 @@ import dev.inmo.tgbotapi.types.message.content.LocationContent
import kotlinx.serialization.*
private val commonResultDeserializer = TelegramBotAPIMessageDeserializationStrategyClass<ContentMessage<LocationContent>>()
const val stopMessageLiveLocationMethod = "stopMessageLiveLocation"
@Serializable
data class StopChatMessageLiveLocation(
@ -20,7 +21,7 @@ data class StopChatMessageLiveLocation(
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditChatMessage<LocationContent>, EditReplyMessage {
override fun method(): String = "stopMessageLiveLocation"
override fun method(): String = stopMessageLiveLocationMethod
override val resultDeserializer: DeserializationStrategy<ContentMessage<LocationContent>>
get() = commonResultDeserializer
override val requestSerializer: SerializationStrategy<*>

View File

@ -13,7 +13,7 @@ data class StopInlineMessageLiveLocation(
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditInlineMessage, EditReplyMessage {
override fun method(): String = "stopMessageLiveLocation"
override fun method(): String = stopMessageLiveLocationMethod
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}

View File

@ -2,7 +2,6 @@ package dev.inmo.tgbotapi.requests.edit.text
import dev.inmo.tgbotapi.CommonAbstracts.*
import dev.inmo.tgbotapi.requests.edit.abstracts.*
import dev.inmo.tgbotapi.requests.edit.media.editMessageMediaMethod
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.MessageEntity.*
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
@ -55,10 +54,10 @@ data class EditInlineMessageText internal constructor(
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditInlineMessage, EditTextChatMessage, EditReplyMessage, EditDisableWebPagePreviewMessage {
override val entities: List<TextSource>? by lazy {
rawEntities ?.asTextParts(text ?: return@lazy null) ?.justTextSources()
rawEntities ?.asTextParts(text) ?.justTextSources()
}
override fun method(): String = editMessageMediaMethod
override fun method(): String = editMessageTextMethod
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}