mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
fix serialization/deserialization of chat member statuses
This commit is contained in:
parent
6103b70a47
commit
dee13c03ae
@ -2,6 +2,9 @@
|
||||
|
||||
## 9.2.1
|
||||
|
||||
* `Core`:
|
||||
* All `ChatMember` inheritors have fixes `status` field
|
||||
|
||||
## 9.2.0
|
||||
|
||||
**Add support of [Telegram Bots API 6.9](https://core.telegram.org/bots/api-changelog#september-22-2023)**
|
||||
|
@ -45,6 +45,5 @@ data class AdministratorChatMemberImpl(
|
||||
) : AdministratorChatMember {
|
||||
@SerialName(statusField)
|
||||
@Required
|
||||
override val status: ChatMember.Status
|
||||
get() = ChatMember.Status.Administrator
|
||||
override val status: ChatMember.Status = ChatMember.Status.Administrator
|
||||
}
|
||||
|
@ -13,6 +13,5 @@ data class KickedChatMember(
|
||||
) : BannedChatMember {
|
||||
@SerialName(statusField)
|
||||
@Required
|
||||
override val status: ChatMember.Status
|
||||
get() = ChatMember.Status.Kicked
|
||||
override val status: ChatMember.Status = ChatMember.Status.Kicked
|
||||
}
|
||||
|
@ -11,6 +11,5 @@ data class LeftChatMemberImpl(
|
||||
) : LeftChatMember {
|
||||
@SerialName(statusField)
|
||||
@Required
|
||||
override val status: ChatMember.Status
|
||||
get() = ChatMember.Status.Left
|
||||
override val status: ChatMember.Status = ChatMember.Status.Left
|
||||
}
|
||||
|
@ -11,6 +11,5 @@ data class MemberChatMemberImpl(
|
||||
) : MemberChatMember {
|
||||
@SerialName(statusField)
|
||||
@Required
|
||||
override val status: ChatMember.Status
|
||||
get() = ChatMember.Status.Member
|
||||
override val status: ChatMember.Status = ChatMember.Status.Member
|
||||
}
|
||||
|
@ -45,6 +45,5 @@ data class OwnerChatMember(
|
||||
|
||||
@SerialName(statusField)
|
||||
@Required
|
||||
override val status: ChatMember.Status
|
||||
get() = ChatMember.Status.Creator
|
||||
override val status: ChatMember.Status = ChatMember.Status.Creator
|
||||
}
|
||||
|
@ -44,6 +44,5 @@ data class RestrictedChatMember(
|
||||
) : BannedChatMember, SpecialRightsChatMember, ChatPermissions {
|
||||
@SerialName(statusField)
|
||||
@Required
|
||||
override val status: ChatMember.Status
|
||||
get() = ChatMember.Status.Restricted
|
||||
override val status: ChatMember.Status = ChatMember.Status.Restricted
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user