mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-11-07 12:23:14 +00:00
extract and deprecate MessageIdentifier
This commit is contained in:
1 parent
009c49247d
commit
08b0564dba
5 files changed
+10
-10
No files matched your search
@@ -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
|
||||
+4
-5
@@ -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
-2
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user