From 26d001accec2b3d8dffd25567c7d7d33612e9bf7 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 28 Jun 2019 19:05:40 +0800 Subject: [PATCH] replace animation to be sure that it will be correctly invoked in case of document availability --- .../TelegramBotAPI/types/message/RawMessage.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/RawMessage.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/RawMessage.kt index 7ee48d369e..8b76a1d96a 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/RawMessage.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/RawMessage.kt @@ -107,6 +107,12 @@ data class RawMessage( caption, adaptedCaptionEntities ) + animation != null -> AnimationContent( + animation, + document, + caption, + adaptedCaptionEntities + ) document != null -> DocumentContent( document, caption, @@ -122,12 +128,6 @@ data class RawMessage( caption, adaptedCaptionEntities ) - animation != null -> AnimationContent( - animation, - document, - caption, - adaptedCaptionEntities - ) sticker != null -> StickerContent(sticker) game != null -> GameContent(game) video_note != null -> VideoNoteContent(video_note)