From d330cd2bfc2e9515bb072d51ed3078d4e6c7856f Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 20 Jan 2020 20:14:52 +0600 Subject: [PATCH] hotfix --- .../insanusmokrassar/TelegramBotAPI/utils/LinksFormatting.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/LinksFormatting.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/LinksFormatting.kt index 3b62bea1f1..9b8825ca0e 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/LinksFormatting.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/LinksFormatting.kt @@ -22,7 +22,7 @@ fun makeLinkToMessage( messageId: MessageIdentifier ): String? { return when { - chat is UsernameChat && chat.username != null -> "$internalLinkBeginning/${chat.username}/$messageId" + chat is UsernameChat && chat.username != null -> "$internalLinkBeginning/${chat.username ?.username}/$messageId" chat !is PrivateChat -> chat.id.chatId.toString().replace( linkIdRedundantPartRegex, ""