1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-23 09:07:12 +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
): 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,
""