1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-26 03:58:44 +00:00
This commit is contained in:
InsanusMokrassar 2020-11-02 11:13:16 +06:00
parent 06ba21fc1f
commit 9e771fa04a
2 changed files with 10 additions and 11 deletions

View File

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

View File

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