mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +00:00
"ChatIdentifier" classes now are "data" classes
This commit is contained in:
parent
bc0606e879
commit
f8746e4555
@ -30,3 +30,4 @@
|
|||||||
* Voice
|
* Voice
|
||||||
* `MessageContent` now is `ResendableContent`
|
* `MessageContent` now is `ResendableContent`
|
||||||
* Now all media sending factories which contains `thumb` have default `null` value
|
* Now all media sending factories which contains `thumb` have default `null` value
|
||||||
|
* `ChatIdentifier` classes now are `data` classes
|
||||||
|
@ -9,7 +9,7 @@ sealed class ChatIdentifier
|
|||||||
* Also used as User Identifier
|
* Also used as User Identifier
|
||||||
*/
|
*/
|
||||||
@Serializable(ChatIdentifierSerializer::class)
|
@Serializable(ChatIdentifierSerializer::class)
|
||||||
class ChatId(
|
data class ChatId(
|
||||||
val chatId: Identifier
|
val chatId: Identifier
|
||||||
) : ChatIdentifier()
|
) : ChatIdentifier()
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ typealias UserId = ChatId
|
|||||||
fun Identifier.toChatId(): ChatId = ChatId(this)
|
fun Identifier.toChatId(): ChatId = ChatId(this)
|
||||||
|
|
||||||
@Serializable(ChatIdentifierSerializer::class)
|
@Serializable(ChatIdentifierSerializer::class)
|
||||||
class Username(
|
data class Username(
|
||||||
val username: String
|
val username: String
|
||||||
) : ChatIdentifier() {
|
) : ChatIdentifier() {
|
||||||
init {
|
init {
|
||||||
|
Loading…
Reference in New Issue
Block a user