diff --git a/CHANGELOG.md b/CHANGELOG.md index 3875da0618..5b94ea9055 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## 0.31.0 +* `Common`: + * **ALL DEPRECATIONS WAS REMOVED** * `Behaviour Builder`: * Extension `TelegramBot#buildBehaviour` have changed its return value: now it is `Job` instead of `FlowsUpdatesFilter` diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/Captioned.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/Captioned.kt index 139ae89e82..c3b4729919 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/Captioned.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/Captioned.kt @@ -30,5 +30,4 @@ val CaptionedInput.textSources * Convert its [CaptionedInput.captionEntities] to list of [dev.inmo.tgbotapi.CommonAbstracts.TextSource] * with [dev.inmo.tgbotapi.types.MessageEntity.textsources.RegularTextSource] */ -@Deprecated("Currently list of entities already full. This method is redundant") -fun CaptionedInput.fullEntitiesList(): TextSourcesList = caption ?.fullListOfSubSource(captionEntities) ?.map { it.source } ?: emptyList() +internal fun CaptionedInput.fullEntitiesList(): TextSourcesList = caption ?.fullListOfSubSource(captionEntities) ?.map { it.source } ?: emptyList() diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/Explained.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/Explained.kt index fb837163fd..c7e7c11982 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/Explained.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/Explained.kt @@ -19,7 +19,7 @@ interface ExplainedOutput : ParsableExplainedOutput, EntitiesExplainedOutput interface ExplainedInput : Explained { /** - * Not full list of entities. This list WILL NOT contain [TextPart]s with [dev.inmo.tgbotapi.types.MessageEntity.textsources.RegularTextSource] + * Full list of entities. This list WILL contain [TextPart]s with [dev.inmo.tgbotapi.types.MessageEntity.textsources.RegularTextSource] * @see [ExplainedInput.fullEntitiesList] */ val explanationEntities: List @@ -36,5 +36,4 @@ val ExplainedInput.textSources * Convert its [ExplainedInput.explanationEntities] to list of [dev.inmo.tgbotapi.CommonAbstracts.TextSource] * with [dev.inmo.tgbotapi.types.MessageEntity.textsources.RegularTextSource] */ -@Deprecated("Currently list of entities already full. This method is redundant") -fun ExplainedInput.fullEntitiesList(): TextSourcesList = explanation ?.fullListOfSubSource(explanationEntities) ?.map { it.source } ?: emptyList() +internal fun ExplainedInput.fullEntitiesList(): TextSourcesList = explanation ?.fullListOfSubSource(explanationEntities) ?.map { it.source } ?: emptyList() diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/TextSource.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/TextSource.kt index 08f70a5041..06481a6ebe 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/TextSource.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/TextSource.kt @@ -8,10 +8,6 @@ import dev.inmo.tgbotapi.types.textLength const val DirectInvocationOfTextSourceConstructor = "It is strongly not recommended to use constructors directly instead of factory methods" typealias TextSourcesList = List -@Deprecated("All lists of TextSource in public API now are full. So, this typealias is redundant") -typealias FullTextSourcesList = List -@Deprecated("All lists of TextPart in public API now are full. So, this typealias is redundant") -typealias FullTextPartsList = List interface TextSource { val markdown: String @@ -21,16 +17,6 @@ interface TextSource { val asText: String get() = source - - @Deprecated("Rename", ReplaceWith("markdown")) - val asMarkdownSource: String - get() = markdown - @Deprecated("Rename", ReplaceWith("markdownV2")) - val asMarkdownV2Source: String - get() = markdownV2 - @Deprecated("Rename", ReplaceWith("html")) - val asHtmlSource: String - get() = html } @Suppress("NOTHING_TO_INLINE") @@ -43,13 +29,7 @@ inline operator fun TextSource.plus(text: String) = listOf(this, regular(text)) inline operator fun List.plus(text: String) = this + regular(text) interface MultilevelTextSource : TextSource { - @Deprecated("Will be removed in near major release") - val textParts: List - get() = textParts(0) val subsources: List - @Deprecated("Will be removed in near major release", ReplaceWith("subsources")) - val textSources: List - get() = subsources } data class TextPart( diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/Texted.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/Texted.kt index afd4ac6dec..40dedb78b9 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/Texted.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/CommonAbstracts/Texted.kt @@ -40,5 +40,4 @@ val TextedInput.textSources * Convert its [TextedInput.textEntities] to list of [dev.inmo.tgbotapi.CommonAbstracts.TextSource] * with [dev.inmo.tgbotapi.types.MessageEntity.textsources.RegularTextSource] */ -@Deprecated("Currently list of entities already full. This method is redundant") -fun TextedInput.fullEntitiesList(): TextSourcesList = text ?.fullListOfSubSource(textEntities) ?.map { it.source } ?: emptyList() +internal fun TextedInput.fullEntitiesList(): TextSourcesList = text ?.fullListOfSubSource(textEntities) ?.map { it.source } ?: emptyList() diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/settings/limiters/ExceptionsOnlyLimiter.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/settings/limiters/ExceptionsOnlyLimiter.kt index 477b4a48f8..e687c48c78 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/settings/limiters/ExceptionsOnlyLimiter.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/settings/limiters/ExceptionsOnlyLimiter.kt @@ -60,6 +60,3 @@ class ExceptionsOnlyLimiter( } } } - -@Deprecated("Renamed", ReplaceWith("ExceptionsOnlyLimiter", "dev.inmo.tgbotapi.bot.settings.limiters.ExceptionsOnlyLimiter")) -typealias EmptyLimiter = ExceptionsOnlyLimiter diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index 34538eedf0..c66d9d81a2 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -62,12 +62,6 @@ val inlineQueryAnswerResultsLimit = 0 .. 50 val customTitleLength = 0 .. 16 val dartsCubeAndBowlingDiceResultLimit = 1 .. 6 -@Deprecated("Renamed", ReplaceWith("dartsCubeAndBowlingDiceResultLimit", "dev.inmo.tgbotapi.types.dartsCubeAndBowlingDiceResultLimit")) -val dartsAndCubeDiceResultLimit - get() = dartsCubeAndBowlingDiceResultLimit -@Deprecated("Renamed", ReplaceWith("dartsCubeAndBowlingDiceResultLimit", "dev.inmo.tgbotapi.types.dartsCubeAndBowlingDiceResultLimit")) -val diceResultLimit - get() = dartsCubeAndBowlingDiceResultLimit val basketballAndFootballDiceResultLimit = 1 .. 5 val slotMachineDiceResultLimit = 1 .. 64 diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocumentCommon.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocumentCommon.kt index fa51b3e0e0..161dce6796 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocumentCommon.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/document/InlineQueryResultDocumentCommon.kt @@ -9,10 +9,5 @@ const val inlineQueryResultDocumentType = "document" interface InlineQueryResultDocumentCommon : InlineQueryResult, TitledInlineQueryResult, DescribedInlineQueryResult, - CaptionedOutput, TextedOutput, - WithInputMessageContentInlineQueryResult { - @Deprecated("Will be removed in next major release") - override val caption: String? - get() = text -} + WithInputMessageContentInlineQueryResult diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGifCommon.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGifCommon.kt index 95e5f14480..a7a38bf89d 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGifCommon.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/gif/InlineQueryResultGifCommon.kt @@ -8,10 +8,5 @@ const val inlineQueryResultGifType = "gif" interface InlineQueryResultGifCommon : InlineQueryResult, OptionallyTitledInlineQueryResult, - CaptionedOutput, TextedOutput, - WithInputMessageContentInlineQueryResult { - @Deprecated("Will be removed in next major release") - override val caption: String? - get() = text -} + WithInputMessageContentInlineQueryResult diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCommon.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCommon.kt index 69b4e5b88c..a9a1d10da6 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCommon.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCommon.kt @@ -8,10 +8,5 @@ const val inlineQueryResultMpeg4GifType = "mpeg4_gif" interface InlineQueryResultMpeg4GifCommon : InlineQueryResult, OptionallyTitledInlineQueryResult, - CaptionedOutput, TextedOutput, - WithInputMessageContentInlineQueryResult { - @Deprecated("Will be removed in next major release") - override val caption: String? - get() = text -} + WithInputMessageContentInlineQueryResult diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhotoCommon.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhotoCommon.kt index 1f33a3a9b9..52af23d9f8 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhotoCommon.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/photo/InlineQueryResultPhotoCommon.kt @@ -9,10 +9,5 @@ const val inlineQueryResultPhotoType = "photo" interface InlineQueryResultPhotoCommon : InlineQueryResult, OptionallyTitledInlineQueryResult, DescribedInlineQueryResult, - CaptionedOutput, TextedOutput, - WithInputMessageContentInlineQueryResult { - @Deprecated("Will be removed in next major release") - override val caption: String? - get() = text -} + WithInputMessageContentInlineQueryResult diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideoCommon.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideoCommon.kt index a015faac61..50db300847 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideoCommon.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/video/InlineQueryResultVideoCommon.kt @@ -9,10 +9,5 @@ const val inlineQueryResultVideoType = "video" interface InlineQueryResultVideoCommon : InlineQueryResult, TitledInlineQueryResult, DescribedInlineQueryResult, - CaptionedOutput, TextedOutput, - WithInputMessageContentInlineQueryResult { - @Deprecated("Will be removed in next major release") - override val caption: String? - get() = text -} + WithInputMessageContentInlineQueryResult diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoiceCommon.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoiceCommon.kt index 0bb3dee55b..7382e23c79 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoiceCommon.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/results/voice/InlineQueryResultVoiceCommon.kt @@ -7,11 +7,6 @@ import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.* const val inlineQueryResultVoiceType = "voice" interface InlineQueryResultVoiceCommon : InlineQueryResult, - CaptionedOutput, TextedOutput, WithInputMessageContentInlineQueryResult, - TitledInlineQueryResult { - @Deprecated("Will be removed in next major release") - override val caption: String? - get() = text -} + TitledInlineQueryResult diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InputMessageContent/InputTextMessageContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InputMessageContent/InputTextMessageContent.kt index 9a2d74746b..5871b5a144 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InputMessageContent/InputTextMessageContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/InputMessageContent/InputTextMessageContent.kt @@ -37,10 +37,7 @@ data class InputTextMessageContent internal constructor( private val rawEntities: List? = null, @SerialName(disableWebPagePreviewField) override val disableWebPagePreview: Boolean? = null -) : CaptionedOutput, TextedOutput, DisableWebPagePreview, InputMessageContent { - @Deprecated("Will be removed in next major release") - override val caption: String? - get() = text +) : TextedOutput, DisableWebPagePreview, InputMessageContent { override val entities: List? by lazy { rawEntities ?.asTextParts(text) ?.justTextSources() } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMedia.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMedia.kt index 48e99180ca..81f0d88c33 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMedia.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMedia.kt @@ -3,9 +3,6 @@ package dev.inmo.tgbotapi.types.InputMedia import dev.inmo.tgbotapi.requests.abstracts.InputFile import kotlinx.serialization.Serializable -@Deprecated("Will be removed due to redundancy for end-side users") -fun String.toInputMediaFileAttachmentName() = "attach://$this" - @Serializable(InputMediaSerializer::class) interface InputMedia { val type: String diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMediaAnimation.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMediaAnimation.kt index 5eb5e61c8e..77eaec8b68 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMediaAnimation.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/InputMediaAnimation.kt @@ -42,16 +42,12 @@ data class InputMediaAnimation internal constructor( override val height: Int? = null, override val duration: Long? = null, override val thumb: InputFile? = null -) : InputMedia, SizedInputMedia, DuratedInputMedia, ThumbedInputMedia, TextedOutput, CaptionedOutput { +) : InputMedia, SizedInputMedia, DuratedInputMedia, ThumbedInputMedia, TextedOutput { override val type: String = "animation" override val entities: List? by lazy { rawEntities ?.asTextParts(text ?: return@lazy null) ?.justTextSources() } - @Deprecated("Will be removed in next major release") - override val caption: String? - get() = text - @SerialName(mediaField) override val media: String init { media = file.fileIdToSend } // crutch until js compiling will be fixed diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/MediaGroupMemberInputMedia.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/MediaGroupMemberInputMedia.kt index 7e63cc915b..e1190be358 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/MediaGroupMemberInputMedia.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InputMedia/MediaGroupMemberInputMedia.kt @@ -16,10 +16,7 @@ internal fun T.buildArguments(withSerializer: SerializationStrategy) = ar ) @Serializable(MediaGroupMemberInputMediaSerializer::class) -interface MediaGroupMemberInputMedia : InputMedia, CaptionedOutput, TextedOutput { - @Deprecated("Will be removed in next major release") - override val caption: String? - get() = text +interface MediaGroupMemberInputMedia : InputMedia, TextedOutput { fun serialize(format: StringFormat): String } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelMessageImpl.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelMessageImpl.kt index ba28d6c5ba..73cdf10cb9 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelMessageImpl.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelMessageImpl.kt @@ -20,6 +20,3 @@ data class ChannelMessageImpl( override val senderBot: CommonBot?, override val authorSignature: AuthorSignature? ) : ChannelMessage - -@Deprecated("Renamed", ReplaceWith("ChannelMessageImpl", "dev.inmo.tgbotapi.types.message.ChannelMessageImpl")) -typealias ChannelMessage = ChannelMessageImpl diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonGroupEventMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonGroupEventMessage.kt index d3c2edb7a4..03e228f693 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonGroupEventMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonGroupEventMessage.kt @@ -7,9 +7,6 @@ import dev.inmo.tgbotapi.types.chat.abstracts.GroupChat import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.GroupEvent import dev.inmo.tgbotapi.types.message.abstracts.GroupEventMessage -@Deprecated("Renamed", ReplaceWith("CommonGroupEventMessage")) -typealias GroupEventMessage = CommonGroupEventMessage<*> - data class CommonGroupEventMessage( override val messageId: MessageIdentifier, override val user: User, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonSupergroupEventMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonSupergroupEventMessage.kt index d79212f169..9ca551d636 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonSupergroupEventMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/CommonSupergroupEventMessage.kt @@ -8,9 +8,6 @@ import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.GroupEvent import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent import dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage -@Deprecated("Renamed", ReplaceWith("CommonSupergroupEventMessage")) -typealias SupergroupEventMessage = CommonSupergroupEventMessage<*> - data class CommonSupergroupEventMessage( override val messageId: MessageIdentifier, override val user: User, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateMessageImpl.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateMessageImpl.kt index 232fb6a88a..e627f034e3 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateMessageImpl.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateMessageImpl.kt @@ -22,6 +22,3 @@ data class PrivateMessageImpl( override val senderBot: CommonBot?, val paymentInfo: SuccessfulPaymentInfo? ) : PrivateMessage - -@Deprecated("Renamed", ReplaceWith("PrivateMessageImpl", "dev.inmo.tgbotapi.types.message.PrivateMessageImpl")) -typealias CommonMessageImpl = PrivateMessageImpl diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/TextContent.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/TextContent.kt index 304ace106a..d22891e934 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/TextContent.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/TextContent.kt @@ -17,10 +17,6 @@ data class TextContent( override val text: String, override val textEntities: List = emptyList() ) : MessageContent, TextedInput { - @Deprecated("Has been renamed", ReplaceWith("textEntities")) - val entities: List - get() = textEntities - override fun createResend( chatId: ChatIdentifier, disableNotification: Boolean, @@ -82,5 +78,4 @@ data class TextContent( * Convert its [TextContent.entities] to list of [dev.inmo.tgbotapi.CommonAbstracts.TextSource] * with [dev.inmo.tgbotapi.types.MessageEntity.textsources.RegularTextSource] */ -@Deprecated("Useless due to the fact that currently every message contains full list of sources") -fun TextContent.fullEntitiesList(): TextSourcesList = text.fullListOfSubSource(entities).map { it.source } +internal fun TextContent.fullEntitiesList(): TextSourcesList = text.fullListOfSubSource(textEntities).map { it.source } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/HandleSafely.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/HandleSafely.kt deleted file mode 100644 index 6f93f28984..0000000000 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/HandleSafely.kt +++ /dev/null @@ -1,21 +0,0 @@ -package dev.inmo.tgbotapi.utils - -import dev.inmo.micro_utils.coroutines.ExceptionHandler -import dev.inmo.micro_utils.coroutines.safely -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.supervisorScope - - -@Deprecated("In future will be used typealias from micro_utils", ReplaceWith("ExceptionHandler", "dev.inmo.micro_utils.coroutines.ExceptionHandler")) -typealias ExceptionHandler = ExceptionHandler -/** - * It will run [block] inside of [supervisorScope] to avoid problems with catching of exceptions - * - * @param [onException] Will be called when happen exception inside of [block]. By default will throw exception - this - * exception will be available for catching - */ -@Deprecated("In future will be used typealias from micro_utils", ReplaceWith("safely", "dev.inmo.micro_utils.coroutines.safely")) -suspend inline fun handleSafely( - noinline onException: ExceptionHandler = { throw it }, - noinline block: suspend CoroutineScope.() -> T -): T = safely(onException, block) diff --git a/tgbotapi.extensions.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/BotBuilder.kt b/tgbotapi.extensions.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/BotBuilder.kt index 9e3c3dd8f5..ba33c8425f 100644 --- a/tgbotapi.extensions.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/BotBuilder.kt +++ b/tgbotapi.extensions.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/BotBuilder.kt @@ -45,17 +45,3 @@ fun buildBot( TelegramAPIUrlsKeeper(token, apiUrl), BotBuilder().apply(block).createHttpClient() ) - -/** - * @return Created by [telegramBotWithCustomClientConfig] function [TelegramBot]. This executor will be preconfigured using [token] and - * [block] - */ -@Deprecated("Renamed", ReplaceWith("buildBot", "dev.inmo.tgbotapi.extensions.api.buildBot")) -fun telegramBot( - token: String, - block: BotBuilder.() -> Unit -): TelegramBot = buildBot( - token, - telegramBotAPIDefaultUrl, - block -) diff --git a/tgbotapi.extensions.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/BotExtensions.kt b/tgbotapi.extensions.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/BotExtensions.kt index 18c1c2bcfb..69c65e2421 100644 --- a/tgbotapi.extensions.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/BotExtensions.kt +++ b/tgbotapi.extensions.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/BotExtensions.kt @@ -1,30 +1,20 @@ package dev.inmo.tgbotapi.extensions.api -import dev.inmo.tgbotapi.bot.Ktor.KtorRequestsExecutorBuilder import dev.inmo.tgbotapi.bot.TelegramBot +import dev.inmo.tgbotapi.bot.Ktor.telegramBot import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper import dev.inmo.tgbotapi.utils.telegramBotAPIDefaultUrl import io.ktor.client.HttpClient import io.ktor.client.HttpClientConfig import io.ktor.client.engine.* -/** - * Allows to create bot using bot [urlsKeeper] - */ -@Deprecated("Replaced in core", ReplaceWith("telegramBot", "dev.inmo.tgbotapi.bot.Ktor.telegramBot")) -fun telegramBot( - urlsKeeper: TelegramAPIUrlsKeeper -): TelegramBot = dev.inmo.tgbotapi.bot.Ktor.telegramBot( - urlsKeeper -) - /** * Allows to create bot using bot [urlsKeeper] and already prepared [client] */ fun telegramBot( urlsKeeper: TelegramAPIUrlsKeeper, client: HttpClient -): TelegramBot = dev.inmo.tgbotapi.bot.Ktor.telegramBot(urlsKeeper) { +): TelegramBot = telegramBot(urlsKeeper) { this.client = client } @@ -69,16 +59,6 @@ inline fun telegramBot( HttpClient(clientConfig) ) -/** - * Allows to create bot using bot [token], [apiUrl] (for custom api servers) and already prepared [client] - */ -@Deprecated("Replaced in core", ReplaceWith("telegramBot", "dev.inmo.tgbotapi.bot.Ktor.telegramBot")) -@Suppress("NOTHING_TO_INLINE") -inline fun telegramBot( - token: String, - apiUrl: String = telegramBotAPIDefaultUrl -): TelegramBot = dev.inmo.tgbotapi.bot.Ktor.telegramBot(token, apiUrl) - /** * Allows to create bot using bot [token], [apiUrl] (for custom api servers) and already prepared [client] */ @@ -130,37 +110,3 @@ inline fun telegramBot( TelegramAPIUrlsKeeper(token, apiUrl), clientConfig ) - -/** - * Allows to create bot using bot [urlsKeeper] and specify [HttpClientEngine] by passing [clientEngine] param and optionally - * configure [HttpClient] using [clientConfig] - */ -@Deprecated("Will be removed in next releases", ReplaceWith("telegramBot", "dev.inmo.tgbotapi.extensions.api.telegramBot")) -fun telegramBotWithCustomClientConfig( - urlsKeeper: TelegramAPIUrlsKeeper, - clientEngine: HttpClientEngine, - clientConfig: HttpClientConfig<*>.() -> Unit -): TelegramBot = telegramBot( - urlsKeeper, - HttpClient(clientEngine, clientConfig) -) - -/** - * Allows to create bot using bot [urlsKeeper] and optionally configure [HttpClient] using [clientConfig] - */ -@Deprecated("Will be removed in next releases", ReplaceWith("telegramBot", "dev.inmo.tgbotapi.extensions.api.telegramBot")) -fun telegramBotWithCustomClientConfig( - urlsKeeper: TelegramAPIUrlsKeeper, - clientConfig: HttpClientConfig<*>.() -> Unit -): TelegramBot = telegramBot( - urlsKeeper, - HttpClient(clientConfig) -) - -@Suppress("NOTHING_TO_INLINE") -@Deprecated("Renamed", ReplaceWith("telegramBot", "dev.inmo.tgbotapi.extensions.api.telegramBot")) -inline fun telegramBotWithCustomClientConfig( - token: String, - apiUrl: String = telegramBotAPIDefaultUrl, - noinline clientConfig: HttpClientConfig<*>.() -> Unit -) = telegramBot(token, apiUrl = apiUrl, clientConfig = clientConfig) diff --git a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/FlowsAggregation.kt b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/FlowsAggregation.kt index bf4c4b8f74..6f6bee5cc5 100644 --- a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/FlowsAggregation.kt +++ b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/FlowsAggregation.kt @@ -1,5 +1,6 @@ package dev.inmo.tgbotapi.extensions.utils +import dev.inmo.micro_utils.coroutines.safely import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.channels.BroadcastChannel import kotlinx.coroutines.flow.* diff --git a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/SafelyShortcut.kt b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/SafelyShortcut.kt deleted file mode 100644 index 9aa29a53d2..0000000000 --- a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/SafelyShortcut.kt +++ /dev/null @@ -1,17 +0,0 @@ -package dev.inmo.tgbotapi.extensions.utils - -import dev.inmo.micro_utils.coroutines.ExceptionHandler -import dev.inmo.tgbotapi.utils.* -import kotlinx.coroutines.CoroutineScope - -/** - * Shortcut for [dev.inmo.micro_utils.coroutines.safely]. It was created for more comfortable way of handling different things - */ -@Deprecated("In future will be used typealias from micro_utils", ReplaceWith("safely", "dev.inmo.micro_utils.coroutines.safely")) -suspend inline fun safely( - noinline onException: ExceptionHandler = { throw it }, - noinline block: suspend CoroutineScope.() -> T -): T = dev.inmo.micro_utils.coroutines.safely( - onException, - block -) diff --git a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/chat_events/ChatEventsSourcesConversations.kt b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/chat_events/ChatEventsSourcesConversations.kt deleted file mode 100644 index 43504fef31..0000000000 --- a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/chat_events/ChatEventsSourcesConversations.kt +++ /dev/null @@ -1,24 +0,0 @@ -package dev.inmo.tgbotapi.extensions.utils.chat_events - -import dev.inmo.tgbotapi.extensions.utils.shortcuts.* -import dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage -import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.mapNotNull -import kotlin.reflect.KClass - -@Deprecated("Refactored, replaced and renamed", ReplaceWith("filterByChatEvent", "dev.inmo.tgbotapi.extensions.utils.shortcuts.filterByChatEvent")) -fun > Flow>.divideBySource(contentType: KClass) = mapNotNull { - if (contentType.isInstance(it)) { - @Suppress("UNCHECKED_CAST") - it as T - } else { - null - } -} - -@Deprecated("Replaced and renamed", ReplaceWith("channelEvents", "dev.inmo.tgbotapi.extensions.utils.shortcuts.channelEvents")) -fun Flow>.onlyChannelEvents() = channelEvents() -@Deprecated("Replaced and renamed", ReplaceWith("groupEvents", "dev.inmo.tgbotapi.extensions.utils.shortcuts.groupEvents")) -fun Flow>.onlyGroupEvents() = groupEvents() -@Deprecated("Replaced and renamed", ReplaceWith("supergroupEvents", "dev.inmo.tgbotapi.extensions.utils.shortcuts.supergroupEvents")) -fun Flow>.onlySupergroupEvents() = supergroupEvents() diff --git a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/LinksFormatting.kt b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/LinksFormatting.kt index d18f6986c6..26a2bc674e 100644 --- a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/LinksFormatting.kt +++ b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/LinksFormatting.kt @@ -84,38 +84,3 @@ private const val stickerSetAddingLinkPrefix = "$internalLinkBeginning/addsticke val StickerSetName.stickerSetLink get() = link(this, "$stickerSetAddingLinkPrefix/$this") - -/** - * @return Link for adding of sticker set with name [stickerSetName] with formatting for [MarkdownV2] - */ -@Deprecated("Use extension `stickerSetLink` + getting of `asMarkdownV2Source` property") -fun makeLinkToAddStickerSetInMarkdownV2( - stickerSetName: StickerSetName -) = stickerSetName.stickerSetLink.markdownV2 -/** - * @return Link for adding of sticker set with name [stickerSetName] with formatting for [Markdown] - */ -@Deprecated("Use extension `stickerSetLink` + getting of `asMarkdownSource` property") -fun makeLinkToAddStickerSetInMarkdown(stickerSetName: StickerSetName) = stickerSetName.stickerSetLink.markdown -/** - * @return Link for adding of sticker set with name [stickerSetName] with formatting for [HTML] - */ -@Deprecated("Use extension `stickerSetLink` + getting of `asHtmlSource` property") -fun makeLinkToAddStickerSetInHtml(stickerSetName: StickerSetName) = stickerSetName.stickerSetLink.html -/** - * Create a link for adding of sticker set with name [stickerSetName]. Was added thanks to user Djaler and based on - * https://github.com/Djaler/evil-bot/blob/master/src/main/kotlin/com/github/djaler/evilbot/utils/StickerUtils.kt#L6-L8 - * - * @see [makeLinkToAddStickerSetInMarkdownV2] - * @see [makeLinkToAddStickerSetInMarkdown] - * @see [makeLinkToAddStickerSetInHtml] - */ -@Deprecated("Use extension `stickerSetLink` + getting of required property") -fun makeLinkToAddStickerSet( - stickerSetName: StickerSetName, - parseMode: ParseMode -) = when (parseMode) { - MarkdownParseMode -> makeLinkToAddStickerSetInMarkdown(stickerSetName) - MarkdownV2ParseMode -> makeLinkToAddStickerSetInMarkdownV2(stickerSetName) - HTMLParseMode -> makeLinkToAddStickerSetInHtml(stickerSetName) -} diff --git a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/ResendingTextFormatting.kt b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/ResendingTextFormatting.kt index ab62b4f1aa..9d28d5215e 100644 --- a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/ResendingTextFormatting.kt +++ b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/ResendingTextFormatting.kt @@ -4,7 +4,6 @@ import dev.inmo.tgbotapi.CommonAbstracts.* import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.ParseMode.* import dev.inmo.tgbotapi.types.message.content.TextContent -import dev.inmo.tgbotapi.types.message.content.fullEntitiesList fun createFormattedText( entities: TextSourcesList, @@ -56,19 +55,19 @@ fun TextSourcesList.toMarkdownCaptions(): List = createMarkdownText( this, captionLength.last ) -fun CaptionedInput.toMarkdownCaptions(): List = fullEntitiesList().toMarkdownCaptions() +fun CaptionedInput.toMarkdownCaptions(): List = textSources.toMarkdownCaptions() fun TextSourcesList.toMarkdownTexts(): List = createMarkdownText( this, textLength.last ) -fun TextContent.toMarkdownTexts(): List = fullEntitiesList().toMarkdownTexts() +fun TextContent.toMarkdownTexts(): List = textSources.toMarkdownTexts() fun TextSourcesList.toMarkdownExplanations(): List = createMarkdownText( this, explanationLimit.last ) -fun ExplainedInput.toMarkdownExplanations(): List = fullEntitiesList().toMarkdownTexts() +fun ExplainedInput.toMarkdownExplanations(): List = textSources.toMarkdownTexts() fun createMarkdownV2Text( @@ -80,19 +79,19 @@ fun TextSourcesList.toMarkdownV2Captions(): List = createMarkdownV2Text( this, captionLength.last ) -fun CaptionedInput.toMarkdownV2Captions(): List = fullEntitiesList().toMarkdownV2Captions() +fun CaptionedInput.toMarkdownV2Captions(): List = textSources.toMarkdownV2Captions() fun TextSourcesList.toMarkdownV2Texts(): List = createMarkdownV2Text( this, textLength.last ) -fun TextContent.toMarkdownV2Texts(): List = fullEntitiesList().toMarkdownV2Texts() +fun TextContent.toMarkdownV2Texts(): List = textSources.toMarkdownV2Texts() fun TextSourcesList.toMarkdownV2Explanations(): List = createMarkdownV2Text( this, explanationLimit.last ) -fun ExplainedInput.toMarkdownV2Explanations(): List = fullEntitiesList().toMarkdownV2Texts() +fun ExplainedInput.toMarkdownV2Explanations(): List = textSources.toMarkdownV2Texts() fun createHtmlText( @@ -104,18 +103,18 @@ fun TextSourcesList.toHtmlCaptions(): List = createHtmlText( this, captionLength.last ) -fun CaptionedInput.toHtmlCaptions(): List = fullEntitiesList().toHtmlCaptions() +fun CaptionedInput.toHtmlCaptions(): List = textSources.toHtmlCaptions() fun TextSourcesList.toHtmlTexts(): List = createHtmlText( this, textLength.last ) -fun TextContent.toHtmlTexts(): List = fullEntitiesList().toHtmlTexts() +fun TextContent.toHtmlTexts(): List = textSources.toHtmlTexts() fun TextSourcesList.toHtmlExplanations(): List = createHtmlText( this, explanationLimit.last ) -fun ExplainedInput.toHtmlExplanations(): List = fullEntitiesList().toHtmlTexts() +fun ExplainedInput.toHtmlExplanations(): List = textSources.toHtmlTexts() diff --git a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/shortcuts/CommandsShortcuts.kt b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/shortcuts/CommandsShortcuts.kt index f23f1aae33..6df7887dea 100644 --- a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/shortcuts/CommandsShortcuts.kt +++ b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/shortcuts/CommandsShortcuts.kt @@ -8,7 +8,6 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.BotCommandTextSource import dev.inmo.tgbotapi.types.MessageEntity.textsources.RegularTextSource import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage import dev.inmo.tgbotapi.types.message.content.TextContent -import dev.inmo.tgbotapi.types.message.content.fullEntitiesList import kotlinx.coroutines.flow.* /** diff --git a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/CommandsFilters.kt b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/CommandsFilters.kt index 6d553cf32e..192b612055 100644 --- a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/CommandsFilters.kt +++ b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/CommandsFilters.kt @@ -7,7 +7,6 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.BotCommandTextSource import dev.inmo.tgbotapi.types.MessageEntity.textsources.RegularTextSource import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage import dev.inmo.tgbotapi.types.message.content.TextContent -import dev.inmo.tgbotapi.types.message.content.fullEntitiesList import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate import kotlinx.coroutines.flow.Flow diff --git a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/SentMessageUpdatesConversations.kt b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/SentMessageUpdatesConversations.kt index 4ee4c8fc40..533488ed3e 100644 --- a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/SentMessageUpdatesConversations.kt +++ b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/SentMessageUpdatesConversations.kt @@ -1,3 +1,5 @@ +@file:Suppress("unused") + package dev.inmo.tgbotapi.extensions.utils.updates import dev.inmo.tgbotapi.types.message.abstracts.* @@ -23,11 +25,6 @@ fun Flow.asCommonMessagesFlow() = mapNotNull { inline fun Flow.chatEvents() = mapNotNull { it.data as? ChatEventMessage<*> } -/** - * Will map incoming [BaseSentMessageUpdate]s to [ChatEventMessage] from [BaseSentMessageUpdate.data] - */ -@Deprecated("Renamed", ReplaceWith("chatEvents", "dev.inmo.tgbotapi.extensions.utils.updates.chatEvents")) -fun Flow.asChatEventsFlow() = chatEvents() /** * Will map incoming [BaseSentMessageUpdate]s to [UnknownMessageType] from [BaseSentMessageUpdate.data]