mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +00:00
fix of #275 and several other internal problems
This commit is contained in:
parent
2aac6c0bde
commit
dc83b8d77a
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
## 0.32.2
|
## 0.32.2
|
||||||
|
|
||||||
|
* `Core`:
|
||||||
|
* Fix of [#275](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/275)
|
||||||
|
|
||||||
## 0.32.1
|
## 0.32.1
|
||||||
|
|
||||||
* `Core`:
|
* `Core`:
|
||||||
|
@ -10,6 +10,7 @@ import dev.inmo.tgbotapi.utils.throwRangeError
|
|||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|
||||||
private val commonResultDeserializer = TelegramBotAPIMessageDeserializationStrategyClass<ContentMessage<LocationContent>>()
|
private val commonResultDeserializer = TelegramBotAPIMessageDeserializationStrategyClass<ContentMessage<LocationContent>>()
|
||||||
|
const val editMessageLiveLocationMethod = "editMessageLiveLocation"
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class EditChatMessageLiveLocation(
|
data class EditChatMessageLiveLocation(
|
||||||
@ -30,7 +31,7 @@ data class EditChatMessageLiveLocation(
|
|||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditChatMessage<LocationContent>, EditReplyMessage, EditLocationMessage {
|
) : EditChatMessage<LocationContent>, EditReplyMessage, EditLocationMessage {
|
||||||
override fun method(): String = "editMessageLiveLocation"
|
override fun method(): String = editMessageLiveLocationMethod
|
||||||
override val resultDeserializer: DeserializationStrategy<ContentMessage<LocationContent>>
|
override val resultDeserializer: DeserializationStrategy<ContentMessage<LocationContent>>
|
||||||
get() = commonResultDeserializer
|
get() = commonResultDeserializer
|
||||||
override val requestSerializer: SerializationStrategy<*>
|
override val requestSerializer: SerializationStrategy<*>
|
||||||
|
@ -23,7 +23,7 @@ data class EditInlineMessageLiveLocation(
|
|||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditInlineMessage, EditReplyMessage, EditLocationMessage {
|
) : EditInlineMessage, EditReplyMessage, EditLocationMessage {
|
||||||
override fun method(): String = "editMessageLiveLocation"
|
override fun method(): String = editMessageLiveLocationMethod
|
||||||
override val requestSerializer: SerializationStrategy<*>
|
override val requestSerializer: SerializationStrategy<*>
|
||||||
get() = serializer()
|
get() = serializer()
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ import dev.inmo.tgbotapi.types.message.content.LocationContent
|
|||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
|
||||||
private val commonResultDeserializer = TelegramBotAPIMessageDeserializationStrategyClass<ContentMessage<LocationContent>>()
|
private val commonResultDeserializer = TelegramBotAPIMessageDeserializationStrategyClass<ContentMessage<LocationContent>>()
|
||||||
|
const val stopMessageLiveLocationMethod = "stopMessageLiveLocation"
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class StopChatMessageLiveLocation(
|
data class StopChatMessageLiveLocation(
|
||||||
@ -20,7 +21,7 @@ data class StopChatMessageLiveLocation(
|
|||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditChatMessage<LocationContent>, EditReplyMessage {
|
) : EditChatMessage<LocationContent>, EditReplyMessage {
|
||||||
override fun method(): String = "stopMessageLiveLocation"
|
override fun method(): String = stopMessageLiveLocationMethod
|
||||||
override val resultDeserializer: DeserializationStrategy<ContentMessage<LocationContent>>
|
override val resultDeserializer: DeserializationStrategy<ContentMessage<LocationContent>>
|
||||||
get() = commonResultDeserializer
|
get() = commonResultDeserializer
|
||||||
override val requestSerializer: SerializationStrategy<*>
|
override val requestSerializer: SerializationStrategy<*>
|
||||||
|
@ -13,7 +13,7 @@ data class StopInlineMessageLiveLocation(
|
|||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditInlineMessage, EditReplyMessage {
|
) : EditInlineMessage, EditReplyMessage {
|
||||||
override fun method(): String = "stopMessageLiveLocation"
|
override fun method(): String = stopMessageLiveLocationMethod
|
||||||
override val requestSerializer: SerializationStrategy<*>
|
override val requestSerializer: SerializationStrategy<*>
|
||||||
get() = serializer()
|
get() = serializer()
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ package dev.inmo.tgbotapi.requests.edit.text
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.*
|
import dev.inmo.tgbotapi.CommonAbstracts.*
|
||||||
import dev.inmo.tgbotapi.requests.edit.abstracts.*
|
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.*
|
||||||
import dev.inmo.tgbotapi.types.MessageEntity.*
|
import dev.inmo.tgbotapi.types.MessageEntity.*
|
||||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||||
@ -55,10 +54,10 @@ data class EditInlineMessageText internal constructor(
|
|||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditInlineMessage, EditTextChatMessage, EditReplyMessage, EditDisableWebPagePreviewMessage {
|
) : EditInlineMessage, EditTextChatMessage, EditReplyMessage, EditDisableWebPagePreviewMessage {
|
||||||
override val entities: List<TextSource>? by lazy {
|
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<*>
|
override val requestSerializer: SerializationStrategy<*>
|
||||||
get() = serializer()
|
get() = serializer()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user