mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-16 13:49:26 +00:00
deeplinking fixes and additions
This commit is contained in:
@@ -46,6 +46,9 @@ fun Byte.toChatId(): ChatId = toLong().toChatId()
|
||||
data class Username(
|
||||
val username: String
|
||||
) : ChatIdentifier() {
|
||||
val usernameWithoutAt
|
||||
get() = username.dropWhile { it == '@' }
|
||||
|
||||
init {
|
||||
if (!username.startsWith("@")) {
|
||||
throw IllegalArgumentException("Username must starts with `@`")
|
||||
|
Reference in New Issue
Block a user