From 852065ad387164bf11c6421e6290b213c2104f98 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 12 Jan 2024 01:44:56 +0600 Subject: [PATCH] get back LinksFormatting for Message --- .../tgbotapi/extensions/utils/formatting/LinksFormatting.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/LinksFormatting.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/LinksFormatting.kt index 5364f4cdda..a158750400 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/LinksFormatting.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/formatting/LinksFormatting.kt @@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.utils.formatting import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.chat.* -import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage +import dev.inmo.tgbotapi.types.message.abstracts.Message import dev.inmo.tgbotapi.types.message.textsources.link import io.ktor.http.encodeURLQueryComponent @@ -69,7 +69,7 @@ fun makeLinkToMessage( ): String = makeLinkToMessage(chatId.chatId, messageId, chatId.threadId) /** - * Link which can be used as by any user to get access to [AccessibleMessage]. Returns null in case when there are no + * Link which can be used as by any user to get access to [Message]. Returns null in case when there are no * known way to build link (for [PrivateChat]s, for example) */ fun makeLinkToMessage( @@ -88,7 +88,7 @@ fun makeLinkToMessage( /** * @see makeLinkToMessage */ -val AccessibleMessage.messageLink: String? +val Message.messageLink: String? get() = makeLinkToMessage( chat, messageId