From dd0e3c04bcfff949f886c3f6b1bed6ce3c42b940 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 11 Dec 2019 10:53:41 +0600 Subject: [PATCH] fix of TextMentionMessageEntity#asHtmlSource --- CHANGELOG.md | 1 + .../types/MessageEntity/TextMentionMessageEntity.kt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8c33ba0ed..185bcdc1a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ * `User` now implement `PrivateChat` * `TextMentionMessageEntity` now accept `PrivateChat` instead of `User` in main constructor * `TextMentionMessageEntity` now contains not user, but contains `PrivateChat` + * Fixeed: `TextMentionMessageEntity#asHtmlSource` previously worked incorrect ## 0.19.0 ImplicitReflection removing diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/TextMentionMessageEntity.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/TextMentionMessageEntity.kt index 41e2eb1f48..1f219205d6 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/TextMentionMessageEntity.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/TextMentionMessageEntity.kt @@ -2,6 +2,7 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity import com.github.insanusmokrassar.TelegramBotAPI.types.User import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PrivateChat +import com.github.insanusmokrassar.TelegramBotAPI.utils.mentionHTML import com.github.insanusmokrassar.TelegramBotAPI.utils.mentionMarkdown class TextMentionMessageEntity( @@ -19,5 +20,5 @@ class TextMentionMessageEntity( ) : this(offset, length, sourceString, user as PrivateChat) override val asMarkdownSource: String = sourceString.mentionMarkdown(privateChat.id) - override val asHtmlSource: String = sourceString.mentionMarkdown(privateChat.id) + override val asHtmlSource: String = sourceString.mentionHTML(privateChat.id) }