mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +00:00
fix in javaLocale extension
This commit is contained in:
parent
a8ae0a296a
commit
46573512a2
@ -30,6 +30,7 @@
|
|||||||
* `CommonUser` was added as representation of default `User`
|
* `CommonUser` was added as representation of default `User`
|
||||||
* `Bot` was added as representation of bot user
|
* `Bot` was added as representation of bot user
|
||||||
* `GetMe` now return `Bot` object
|
* `GetMe` now return `Bot` object
|
||||||
|
* Now extension `javaLocale` is extension for `CommonUser`
|
||||||
|
|
||||||
## 0.22.0
|
## 0.22.0
|
||||||
|
|
||||||
|
@ -2,6 +2,6 @@ package com.github.insanusmokrassar.TelegramBotAPI.types
|
|||||||
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
fun User.javaLocale(): Locale? = languageCode ?.let {
|
fun CommonUser.javaLocale(): Locale? = languageCode ?.let {
|
||||||
Locale.forLanguageTag(it)
|
Locale.forLanguageTag(it)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user