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