mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +00:00
post fixes for serialization update
This commit is contained in:
parent
dcb837b155
commit
18a6efabb8
@ -23,5 +23,4 @@ internal object ChatMemberDeserializationStrategy : DeserializationStrategy<Chat
|
|||||||
override val descriptor: SerialDescriptor = RawChatMember.serializer().descriptor
|
override val descriptor: SerialDescriptor = RawChatMember.serializer().descriptor
|
||||||
|
|
||||||
override fun deserialize(decoder: Decoder): ChatMember = RawChatMember.serializer().deserialize(decoder).asChatMember
|
override fun deserialize(decoder: Decoder): ChatMember = RawChatMember.serializer().deserialize(decoder).asChatMember
|
||||||
override fun patch(decoder: Decoder, old: ChatMember): ChatMember = error("ChatMember can't be patched")
|
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,6 @@ internal class TelegramBotAPIMessageDeserializationStrategyClass<T> : Deserializ
|
|||||||
@InternalSerializationApi
|
@InternalSerializationApi
|
||||||
override val descriptor: SerialDescriptor = buildSerialDescriptor("TelegramBotAPIMessageSerializer", PolymorphicKind.OPEN)
|
override val descriptor: SerialDescriptor = buildSerialDescriptor("TelegramBotAPIMessageSerializer", PolymorphicKind.OPEN)
|
||||||
|
|
||||||
override fun patch(decoder: Decoder, old: T): T = error("TelegramBotAPIMessageSerializer")
|
|
||||||
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
override fun deserialize(decoder: Decoder): T {
|
override fun deserialize(decoder: Decoder): T {
|
||||||
return RawMessage.serializer().deserialize(decoder).asMessage as T
|
return RawMessage.serializer().deserialize(decoder).asMessage as T
|
||||||
|
@ -47,6 +47,4 @@ object UpdateDeserializationStrategy : DeserializationStrategy<Update> {
|
|||||||
asJson
|
asJson
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun patch(decoder: Decoder, old: Update): Update = error("Unsupported operation")
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user