mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +00:00
extract and deprecate MessageIdentifier
This commit is contained in:
parent
009c49247d
commit
08b0564dba
@ -5,7 +5,7 @@
|
||||
**THIS UPDATE CONTAINS REMOVES OF DEPRECATED THINGS**
|
||||
|
||||
* `Core`:
|
||||
* `MessageId` now is `value class`
|
||||
* `MessageId` now is `value class`. `MessageIdentifier` become deprecated
|
||||
* `MessageThreadId` now is `value class`
|
||||
* `InlineQueryIdentifier` now is `value class`
|
||||
* `MediaGroupIdentifier` now is `value class`
|
||||
|
@ -10,7 +10,6 @@ import kotlinx.serialization.encoding.Encoder
|
||||
import kotlin.jvm.JvmInline
|
||||
|
||||
typealias Identifier = Long
|
||||
typealias MessageIdentifier = MessageId
|
||||
typealias ForwardSignature = String
|
||||
typealias ForwardSenderName = String
|
||||
typealias AuthorSignature = ForwardSignature
|
||||
|
@ -31,4 +31,7 @@ value class MessageId(
|
||||
val long: Long
|
||||
)
|
||||
|
||||
fun Long.asTelegramMessageId() = MessageId(this)
|
||||
fun Long.asTelegramMessageId() = MessageId(this)
|
||||
|
||||
@Deprecated("Renamed", ReplaceWith("MessageId", "dev.inmo.tgbotapi.types.MessageId"))
|
||||
typealias MessageIdentifier = MessageId
|
@ -1,6 +1,5 @@
|
||||
package dev.inmo.tgbotapi.types.chat
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.WithPreviewChat
|
||||
import dev.inmo.tgbotapi.abstracts.WithPreviewChatAndMessageId
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.reactions.Reaction
|
||||
@ -28,7 +27,7 @@ sealed interface ChatMessageReactionUpdated : WithPreviewChatAndMessageId {
|
||||
@SerialName(chatField)
|
||||
override val chat: PreviewChat,
|
||||
@SerialName(messageIdField)
|
||||
override val messageId: MessageIdentifier,
|
||||
override val messageId: MessageId,
|
||||
@SerialName(userField)
|
||||
override val reactedUser: PreviewUser,
|
||||
@Serializable(TelegramDateSerializer::class)
|
||||
@ -48,7 +47,7 @@ sealed interface ChatMessageReactionUpdated : WithPreviewChatAndMessageId {
|
||||
@SerialName(chatField)
|
||||
override val chat: PreviewChat,
|
||||
@SerialName(messageIdField)
|
||||
override val messageId: MessageIdentifier,
|
||||
override val messageId: MessageId,
|
||||
@SerialName(actorChatField)
|
||||
override val reactedChat: PreviewChat,
|
||||
@Serializable(TelegramDateSerializer::class)
|
||||
@ -68,7 +67,7 @@ sealed interface ChatMessageReactionUpdated : WithPreviewChatAndMessageId {
|
||||
@SerialName(chatField)
|
||||
override val chat: PreviewChat,
|
||||
@SerialName(messageIdField)
|
||||
override val messageId: MessageIdentifier,
|
||||
override val messageId: MessageId,
|
||||
@SerialName(actorChatField)
|
||||
override val reactedChat: PreviewChat?,
|
||||
@SerialName(userField)
|
||||
@ -88,7 +87,7 @@ sealed interface ChatMessageReactionUpdated : WithPreviewChatAndMessageId {
|
||||
@SerialName(chatField)
|
||||
val chat: PreviewChat,
|
||||
@SerialName(messageIdField)
|
||||
val messageId: MessageIdentifier,
|
||||
val messageId: MessageId,
|
||||
@SerialName(userField)
|
||||
val reactedUser: PreviewUser? = null,
|
||||
@SerialName(actorChatField)
|
||||
|
@ -1,6 +1,5 @@
|
||||
package dev.inmo.tgbotapi.types.chat
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.WithPreviewChat
|
||||
import dev.inmo.tgbotapi.abstracts.WithPreviewChatAndMessageId
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.reactions.ReactionsCount
|
||||
@ -12,7 +11,7 @@ data class ChatMessageReactionsCountUpdated(
|
||||
@SerialName(chatField)
|
||||
override val chat: PreviewChat,
|
||||
@SerialName(messageIdField)
|
||||
override val messageId: MessageIdentifier,
|
||||
override val messageId: MessageId,
|
||||
@Serializable(TelegramDateSerializer::class)
|
||||
@SerialName(dateField)
|
||||
val date: TelegramDate,
|
||||
|
Loading…
Reference in New Issue
Block a user