mirror of
				https://github.com/InsanusMokrassar/TelegramBotAPI.git
				synced 2025-10-25 17:20:07 +00:00 
			
		
		
		
	fixes in webappuser
This commit is contained in:
		| @@ -27,18 +27,18 @@ val WebAppUser.isPremium | |||||||
|  |  | ||||||
| fun WebAppUser.asUser() = if (isBot == true) { | fun WebAppUser.asUser() = if (isBot == true) { | ||||||
|     CommonBot( |     CommonBot( | ||||||
|         UserId(id), |         id = UserId(id), | ||||||
|         firstName, |         firstName = firstName, | ||||||
|         lastName ?: "", |         lastName = lastName ?: "", | ||||||
|         username ?.let(::Username) ?: error("Username is absent for bot, but must exists") |         username = username ?.let(::Username) | ||||||
|     ) |     ) | ||||||
| } else { | } else { | ||||||
|     CommonUser( |     CommonUser( | ||||||
|         UserId(id), |         id = UserId(id), | ||||||
|         firstName, |         firstName = firstName, | ||||||
|         lastName ?: "", |         lastName = lastName ?: "", | ||||||
|         username ?.let(::Username), |         username = username ?.let(::Username), | ||||||
|         languageCode ?.let(::IetfLanguageCode), |         ietfLanguageCode = languageCode ?.let(::IetfLanguageCode), | ||||||
|         isPremium = isPremium |         isPremium = isPremium | ||||||
|     ) |     ) | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user