mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23: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**
|
**THIS UPDATE CONTAINS REMOVES OF DEPRECATED THINGS**
|
||||||
|
|
||||||
* `Core`:
|
* `Core`:
|
||||||
* `MessageId` now is `value class`
|
* `MessageId` now is `value class`. `MessageIdentifier` become deprecated
|
||||||
* `MessageThreadId` now is `value class`
|
* `MessageThreadId` now is `value class`
|
||||||
* `InlineQueryIdentifier` now is `value class`
|
* `InlineQueryIdentifier` now is `value class`
|
||||||
* `MediaGroupIdentifier` now is `value class`
|
* `MediaGroupIdentifier` now is `value class`
|
||||||
|
@ -10,7 +10,6 @@ import kotlinx.serialization.encoding.Encoder
|
|||||||
import kotlin.jvm.JvmInline
|
import kotlin.jvm.JvmInline
|
||||||
|
|
||||||
typealias Identifier = Long
|
typealias Identifier = Long
|
||||||
typealias MessageIdentifier = MessageId
|
|
||||||
typealias ForwardSignature = String
|
typealias ForwardSignature = String
|
||||||
typealias ForwardSenderName = String
|
typealias ForwardSenderName = String
|
||||||
typealias AuthorSignature = ForwardSignature
|
typealias AuthorSignature = ForwardSignature
|
||||||
|
@ -32,3 +32,6 @@ value class MessageId(
|
|||||||
)
|
)
|
||||||
|
|
||||||
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
|
package dev.inmo.tgbotapi.types.chat
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.abstracts.WithPreviewChat
|
|
||||||
import dev.inmo.tgbotapi.abstracts.WithPreviewChatAndMessageId
|
import dev.inmo.tgbotapi.abstracts.WithPreviewChatAndMessageId
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.reactions.Reaction
|
import dev.inmo.tgbotapi.types.reactions.Reaction
|
||||||
@ -28,7 +27,7 @@ sealed interface ChatMessageReactionUpdated : WithPreviewChatAndMessageId {
|
|||||||
@SerialName(chatField)
|
@SerialName(chatField)
|
||||||
override val chat: PreviewChat,
|
override val chat: PreviewChat,
|
||||||
@SerialName(messageIdField)
|
@SerialName(messageIdField)
|
||||||
override val messageId: MessageIdentifier,
|
override val messageId: MessageId,
|
||||||
@SerialName(userField)
|
@SerialName(userField)
|
||||||
override val reactedUser: PreviewUser,
|
override val reactedUser: PreviewUser,
|
||||||
@Serializable(TelegramDateSerializer::class)
|
@Serializable(TelegramDateSerializer::class)
|
||||||
@ -48,7 +47,7 @@ sealed interface ChatMessageReactionUpdated : WithPreviewChatAndMessageId {
|
|||||||
@SerialName(chatField)
|
@SerialName(chatField)
|
||||||
override val chat: PreviewChat,
|
override val chat: PreviewChat,
|
||||||
@SerialName(messageIdField)
|
@SerialName(messageIdField)
|
||||||
override val messageId: MessageIdentifier,
|
override val messageId: MessageId,
|
||||||
@SerialName(actorChatField)
|
@SerialName(actorChatField)
|
||||||
override val reactedChat: PreviewChat,
|
override val reactedChat: PreviewChat,
|
||||||
@Serializable(TelegramDateSerializer::class)
|
@Serializable(TelegramDateSerializer::class)
|
||||||
@ -68,7 +67,7 @@ sealed interface ChatMessageReactionUpdated : WithPreviewChatAndMessageId {
|
|||||||
@SerialName(chatField)
|
@SerialName(chatField)
|
||||||
override val chat: PreviewChat,
|
override val chat: PreviewChat,
|
||||||
@SerialName(messageIdField)
|
@SerialName(messageIdField)
|
||||||
override val messageId: MessageIdentifier,
|
override val messageId: MessageId,
|
||||||
@SerialName(actorChatField)
|
@SerialName(actorChatField)
|
||||||
override val reactedChat: PreviewChat?,
|
override val reactedChat: PreviewChat?,
|
||||||
@SerialName(userField)
|
@SerialName(userField)
|
||||||
@ -88,7 +87,7 @@ sealed interface ChatMessageReactionUpdated : WithPreviewChatAndMessageId {
|
|||||||
@SerialName(chatField)
|
@SerialName(chatField)
|
||||||
val chat: PreviewChat,
|
val chat: PreviewChat,
|
||||||
@SerialName(messageIdField)
|
@SerialName(messageIdField)
|
||||||
val messageId: MessageIdentifier,
|
val messageId: MessageId,
|
||||||
@SerialName(userField)
|
@SerialName(userField)
|
||||||
val reactedUser: PreviewUser? = null,
|
val reactedUser: PreviewUser? = null,
|
||||||
@SerialName(actorChatField)
|
@SerialName(actorChatField)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package dev.inmo.tgbotapi.types.chat
|
package dev.inmo.tgbotapi.types.chat
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.abstracts.WithPreviewChat
|
|
||||||
import dev.inmo.tgbotapi.abstracts.WithPreviewChatAndMessageId
|
import dev.inmo.tgbotapi.abstracts.WithPreviewChatAndMessageId
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.reactions.ReactionsCount
|
import dev.inmo.tgbotapi.types.reactions.ReactionsCount
|
||||||
@ -12,7 +11,7 @@ data class ChatMessageReactionsCountUpdated(
|
|||||||
@SerialName(chatField)
|
@SerialName(chatField)
|
||||||
override val chat: PreviewChat,
|
override val chat: PreviewChat,
|
||||||
@SerialName(messageIdField)
|
@SerialName(messageIdField)
|
||||||
override val messageId: MessageIdentifier,
|
override val messageId: MessageId,
|
||||||
@Serializable(TelegramDateSerializer::class)
|
@Serializable(TelegramDateSerializer::class)
|
||||||
@SerialName(dateField)
|
@SerialName(dateField)
|
||||||
val date: TelegramDate,
|
val date: TelegramDate,
|
||||||
|
Loading…
Reference in New Issue
Block a user