mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-05 08:09:21 +00:00
make bots username nullable
This commit is contained in:
@@ -28,9 +28,9 @@ val WebAppUser.isPremium
|
||||
fun WebAppUser.asUser() = if (isBot == true) {
|
||||
CommonBot(
|
||||
UserId(id),
|
||||
username ?.let(::Username) ?: error("Username is absent for bot, but must exists"),
|
||||
firstName,
|
||||
lastName ?: ""
|
||||
lastName ?: "",
|
||||
username ?.let(::Username) ?: error("Username is absent for bot, but must exists")
|
||||
)
|
||||
} else {
|
||||
CommonUser(
|
||||
|
Reference in New Issue
Block a user