mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-10-31 21:43:48 +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
|
## 9.2.1
|
||||||
|
|
||||||
|
* `Core`:
|
||||||
|
* All `ChatMember` inheritors have fixes `status` field
|
||||||
|
|
||||||
## 9.2.0
|
## 9.2.0
|
||||||
|
|
||||||
**Add support of [Telegram Bots API 6.9](https://core.telegram.org/bots/api-changelog#september-22-2023)**
|
**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 {
|
) : AdministratorChatMember {
|
||||||
@SerialName(statusField)
|
@SerialName(statusField)
|
||||||
@Required
|
@Required
|
||||||
override val status: ChatMember.Status
|
override val status: ChatMember.Status = ChatMember.Status.Administrator
|
||||||
get() = ChatMember.Status.Administrator
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,5 @@ data class KickedChatMember(
|
|||||||
) : BannedChatMember {
|
) : BannedChatMember {
|
||||||
@SerialName(statusField)
|
@SerialName(statusField)
|
||||||
@Required
|
@Required
|
||||||
override val status: ChatMember.Status
|
override val status: ChatMember.Status = ChatMember.Status.Kicked
|
||||||
get() = ChatMember.Status.Kicked
|
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,5 @@ data class LeftChatMemberImpl(
|
|||||||
) : LeftChatMember {
|
) : LeftChatMember {
|
||||||
@SerialName(statusField)
|
@SerialName(statusField)
|
||||||
@Required
|
@Required
|
||||||
override val status: ChatMember.Status
|
override val status: ChatMember.Status = ChatMember.Status.Left
|
||||||
get() = ChatMember.Status.Left
|
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,5 @@ data class MemberChatMemberImpl(
|
|||||||
) : MemberChatMember {
|
) : MemberChatMember {
|
||||||
@SerialName(statusField)
|
@SerialName(statusField)
|
||||||
@Required
|
@Required
|
||||||
override val status: ChatMember.Status
|
override val status: ChatMember.Status = ChatMember.Status.Member
|
||||||
get() = ChatMember.Status.Member
|
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,5 @@ data class OwnerChatMember(
|
|||||||
|
|
||||||
@SerialName(statusField)
|
@SerialName(statusField)
|
||||||
@Required
|
@Required
|
||||||
override val status: ChatMember.Status
|
override val status: ChatMember.Status = ChatMember.Status.Creator
|
||||||
get() = ChatMember.Status.Creator
|
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,5 @@ data class RestrictedChatMember(
|
|||||||
) : BannedChatMember, SpecialRightsChatMember, ChatPermissions {
|
) : BannedChatMember, SpecialRightsChatMember, ChatPermissions {
|
||||||
@SerialName(statusField)
|
@SerialName(statusField)
|
||||||
@Required
|
@Required
|
||||||
override val status: ChatMember.Status
|
override val status: ChatMember.Status = ChatMember.Status.Restricted
|
||||||
get() = ChatMember.Status.Restricted
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user