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

Fixes in ChatMemberSerializer#serialize method

This commit is contained in:
InsanusMokrassar 2022-09-19 02:17:40 +06:00
parent 69c5f1ae7d
commit d450ed9126
2 changed files with 9 additions and 6 deletions

View File

@ -2,6 +2,9 @@
## 3.2.6
* `Core`:
* Fixes in `ChatMemberSerializer#serialize` method
## 3.2.5
* `Common`:

View File

@ -34,12 +34,12 @@ object ChatMemberSerializer : KSerializer<ChatMember> {
override fun serialize(encoder: Encoder, value: ChatMember) {
when (value) {
is OwnerChatMember -> OwnerChatMember.serializer()
is AdministratorChatMemberImpl -> AdministratorChatMemberImpl.serializer()
is MemberChatMember -> MemberChatMemberImpl.serializer()
is RestrictedChatMember -> RestrictedChatMember.serializer()
is LeftChatMember -> LeftChatMemberImpl.serializer()
is KickedChatMember -> KickedChatMember.serializer()
is OwnerChatMember -> OwnerChatMember.serializer().serialize(encoder, value)
is AdministratorChatMemberImpl -> AdministratorChatMemberImpl.serializer().serialize(encoder, value)
is MemberChatMemberImpl -> MemberChatMemberImpl.serializer().serialize(encoder, value)
is RestrictedChatMember -> RestrictedChatMember.serializer().serialize(encoder, value)
is LeftChatMemberImpl -> LeftChatMemberImpl.serializer().serialize(encoder, value)
is KickedChatMember -> KickedChatMember.serializer().serialize(encoder, value)
}
}
}