1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-16 13:23:47 +00:00
This commit is contained in:
InsanusMokrassar 2020-01-20 20:14:52 +06:00
parent 92224b95df
commit d330cd2bfc

View File

@ -22,7 +22,7 @@ fun makeLinkToMessage(
messageId: MessageIdentifier messageId: MessageIdentifier
): String? { ): String? {
return when { 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( chat !is PrivateChat -> chat.id.chatId.toString().replace(
linkIdRedundantPartRegex, linkIdRedundantPartRegex,
"" ""