1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-22 16:47:13 +00:00

fix serialization/deserialization of chat member statuses

This commit is contained in:
InsanusMokrassar 2023-09-29 22:16:10 +06:00
parent 6103b70a47
commit dee13c03ae
7 changed files with 9 additions and 12 deletions

View File

@ -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)**

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}