From 39ca29279f5cb61d1c1c4bc344fda7182ce79722 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 2 Oct 2020 18:07:16 +0600 Subject: [PATCH] fix forward_from_chat for SupergroupChat --- .../insanusmokrassar/TelegramBotAPI/types/message/ForwardInfo.kt | 1 - .../insanusmokrassar/TelegramBotAPI/types/message/RawMessage.kt | 1 - 2 files changed, 2 deletions(-) diff --git a/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ForwardInfo.kt b/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ForwardInfo.kt index 55dbd39068..09dc713086 100644 --- a/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ForwardInfo.kt +++ b/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ForwardInfo.kt @@ -27,6 +27,5 @@ data class ForwardFromChannelInfo( data class ForwardFromSupergroupInfo( override val dateOfOriginal: TelegramDate, - val messageId: MessageIdentifier, val group: SupergroupChat ) : ForwardInfo() diff --git a/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/RawMessage.kt b/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/RawMessage.kt index 1fbe57125d..7227cffe15 100644 --- a/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/RawMessage.kt +++ b/TelegramBotAPI-core/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/RawMessage.kt @@ -155,7 +155,6 @@ internal data class RawMessage( ) forward_from_chat is SupergroupChat -> ForwardFromSupergroupInfo( forward_date, - forward_from_message_id ?: error("Channel forwarded message must contain message id, but was not"), forward_from_chat ) forward_from != null -> UserForwardInfo(