From 4e276846b47672f264e0bc2dd8ed6dd087669629 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 2 Jun 2019 22:57:52 +0800 Subject: [PATCH] String#asUsername -> String#toUsername --- CHANGELOG.md | 1 + .../insanusmokrassar/TelegramBotAPI/types/ChatIdentifier.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 209f60bbb8..399724d00a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * `replyMarkup` field was added to the `CommonMessage` objects via `AbleToBeMarkedUp` interface * `SwitchInlineQueryCurrentChatInlineKeyboardButton#switchInlineQueryCurrentChat` field fixed * `InlineKeyboardButton` now is sealed class and all its possible realisations are inside of its class file +* `String#asUsername` method renamed to `String#toUsername` ## 0.15.0 diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatIdentifier.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatIdentifier.kt index dfaa6eb2c2..7877fe3fcd 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatIdentifier.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/ChatIdentifier.kt @@ -32,7 +32,7 @@ data class Username( } } -fun String.asUsername(): Username = Username(this) +fun String.toUsername(): Username = Username(this) @Serializer(ChatIdentifier::class) internal class ChatIdentifierSerializer: KSerializer {