1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-26 03:58:44 +00:00

filling of changelog and renaming of new function makeLink -> makeUsernameLink

This commit is contained in:
InsanusMokrassar 2020-11-16 16:25:10 +06:00
parent c2032d21cd
commit 41bf3c7f0b
2 changed files with 13 additions and 2 deletions

View File

@ -7,6 +7,17 @@
* `asMarkdownSource` -> `markdown` * `asMarkdownSource` -> `markdown`
* `asMarkdownV2Source` -> `markdownV2` * `asMarkdownV2Source` -> `markdownV2`
* `asHtmlSource` -> `html` * `asHtmlSource` -> `html`
* `PrivateChat` override `id` property with type `UserId`
* Several new extensions and functions in links creation:
* New function `makeUsernameLink` with parameter `String`
* New extension `Username#link` and function `makeLink(Username)`
* Function `makeLinkToMessage` now able to get any type of chat
* New extension `Message#link`
* Old functions `makeLinkToAddStickerSet...` has been deprecated:
* `makeLinkToAddStickerSet`
* `makeLinkToAddStickerSetInMarkdownV2`
* `makeLinkToAddStickerSetInMarkdown`
* `makeLinkToAddStickerSetInHtml`
## 0.30.5 ## 0.30.5

View File

@ -9,9 +9,9 @@ import dev.inmo.tgbotapi.types.message.abstracts.Message
private const val internalLinkBeginning = "https://t.me" private const val internalLinkBeginning = "https://t.me"
fun makeLink(username: String) = "$internalLinkBeginning/$username" fun makeUsernameLink(username: String) = "$internalLinkBeginning/$username"
inline val Username.link inline val Username.link
get() = makeLink(username) get() = makeUsernameLink(username)
inline fun makeLink(username: Username) = username.link inline fun makeLink(username: Username) = username.link
fun makeLinkToMessage( fun makeLinkToMessage(