From 4d92588390613d41c4d6034f38102bacf6c138e9 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 12 Jan 2024 01:11:57 +0600 Subject: [PATCH] update changelog --- CHANGELOG.md | 11 +++++++++++ gradle/libs.versions.toml | 2 +- .../kotlin/dev/inmo/tgbotapi/types/ReplyInfo.kt | 2 +- .../dev/inmo/tgbotapi/types/message/RawMessage.kt | 2 +- .../inmo/tgbotapi/types/message/abstracts/Message.kt | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4891f3983..6eda7f1847 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,17 @@ **IN THIS UPDATE KRYPTO DEPENDENCY CHANGED TO `com.soywiz.korge:korlibs-crypto` UP TO 5.3.0 VERSION** +* `Version`: + * `MicroUtils`: `0.20.23` -> `0.20.26` + * `Korlibs`: `4.0.10` -> `5.3.0` +* `Core`: + * `Message` now inherited by two variants: `AccessibleMessage` and `InaccessibleMessage` +* `Common`: + * In most places `disableWebPagePreview` has been replaced by new `LinkPreviewOptions` + * In most places arguments `replyToMessageId` and `allowSendingWithoutReply` has been replaced with + `ReplyParameters` + * In `reply` extension two parameters have been added: `replyInChatId` and `replyInThreadId` + ## 9.4.3 **IetfLanguageCode has been renamed to IetfLang in MicroUtils** diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c27a805358..a45ca4b8f7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -13,7 +13,7 @@ ktor = "2.3.7" ksp = "1.9.22-1.0.16" kotlin-poet = "1.15.3" -microutils = "0.20.25" +microutils = "0.20.26" kslog = "1.3.1" versions = "0.50.0" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ReplyInfo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ReplyInfo.kt index 21b5244bde..419a3bba83 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ReplyInfo.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ReplyInfo.kt @@ -28,7 +28,7 @@ sealed interface ReplyInfo { val messageMeta: Message.MetaInfo? data class Internal( - val message: AccessibleMessage + val message: Message ): ReplyInfo { override val messageMeta: Message.MetaInfo get() = message.metaInfo diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt index e28264eda0..0a8735da19 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt @@ -251,7 +251,7 @@ internal data class RawMessage( } } - val asMessage: AccessibleMessage by lazy { + val asMessage: Message by lazy { if (date.date == 0L) { return@lazy InaccessibleMessage( chat, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/Message.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/Message.kt index 69a1906a3c..e439de4b23 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/Message.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/Message.kt @@ -49,7 +49,7 @@ interface AccessibleMessage : Message data class InaccessibleMessage( override val chat: PreviewChat, override val messageId: MessageId, -) : AccessibleMessage { +) : Message { override val date: DateTime get() = DateTime.invoke(0L) }