mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-23 00:57:13 +00:00
fixes
This commit is contained in:
parent
06ba21fc1f
commit
9e771fa04a
@ -38,7 +38,7 @@ internal object DiceAnimationTypeSerializer : KSerializer<DiceAnimationType> {
|
||||
CubeDiceAnimationType.emoji -> CubeDiceAnimationType
|
||||
DartsDiceAnimationType.emoji -> DartsDiceAnimationType
|
||||
BasketballDiceAnimationType.emoji -> BasketballDiceAnimationType
|
||||
SlotMachineDiceAnimationType.emoji -> BasketballDiceAnimationType
|
||||
SlotMachineDiceAnimationType.emoji -> SlotMachineDiceAnimationType
|
||||
else -> CustomDiceAnimationType(type)
|
||||
}
|
||||
}
|
||||
|
@ -220,17 +220,20 @@ internal data class RawMessage(
|
||||
}
|
||||
} ?: content?.let { content ->
|
||||
media_group_id?.let {
|
||||
val checkedContent = when (content) {
|
||||
is PhotoContent -> content
|
||||
is VideoContent -> content
|
||||
is AudioContent -> content
|
||||
is DocumentContent -> content
|
||||
else -> error("Unsupported content for media group")
|
||||
}
|
||||
when (from) {
|
||||
null -> ChannelMediaGroupMessage(
|
||||
messageId,
|
||||
chat,
|
||||
date.asDate,
|
||||
it,
|
||||
when (content) {
|
||||
is PhotoContent -> content
|
||||
is VideoContent -> content
|
||||
else -> error("Unsupported content for media group")
|
||||
},
|
||||
checkedContent,
|
||||
edit_date?.asDate,
|
||||
forwarded,
|
||||
reply_to_message?.asMessage,
|
||||
@ -242,11 +245,7 @@ internal data class RawMessage(
|
||||
chat,
|
||||
date.asDate,
|
||||
it,
|
||||
when (content) {
|
||||
is PhotoContent -> content
|
||||
is VideoContent -> content
|
||||
else -> error("Unsupported content for media group")
|
||||
},
|
||||
checkedContent,
|
||||
edit_date?.asDate,
|
||||
forwarded,
|
||||
reply_to_message?.asMessage,
|
||||
|
Loading…
Reference in New Issue
Block a user