1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-29 13:38:43 +00:00

ForwardFromChannelInfo#channelChat now is ChannelChat

This commit is contained in:
InsanusMokrassar 2020-02-25 13:45:32 +06:00
parent 54e3c43999
commit b22d8a5a25
3 changed files with 4 additions and 2 deletions

View File

@ -5,6 +5,7 @@
* `TelegramBotAPI`: * `TelegramBotAPI`:
* All suspend functions for `RequestsExecutor` was removed (due to replacement into * All suspend functions for `RequestsExecutor` was removed (due to replacement into
[TelegramBotAPI extensions project](TelegramBotAPI-extensions-api/README.md)) [TelegramBotAPI extensions project](TelegramBotAPI-extensions-api/README.md))
* `ForwardFromChannelInfo#channelChat` now is `ChannelChat` instead of `Chat`
* `TelegramBotAPI-extensions-api`: * `TelegramBotAPI-extensions-api`:
* Most part of sending media messages functions was removed and replaced with their `InputFile` args analogs * Most part of sending media messages functions was removed and replaced with their `InputFile` args analogs

View File

@ -1,6 +1,7 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.message package com.github.insanusmokrassar.TelegramBotAPI.types.message
import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.ChannelChat
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
@Deprecated( @Deprecated(
@ -52,6 +53,6 @@ typealias ForwardedFromChannelMessage = ForwardFromChannelInfo
data class ForwardFromChannelInfo( data class ForwardFromChannelInfo(
override val dateOfOriginal: TelegramDate, override val dateOfOriginal: TelegramDate,
val messageId: MessageIdentifier, val messageId: MessageIdentifier,
val channelChat: Chat, val channelChat: ChannelChat,
val signature: String? = null val signature: String? = null
) : ForwardInfo() ) : ForwardInfo()

View File

@ -142,7 +142,7 @@ internal data class RawMessage(
forward_date, forward_date,
forward_sender_name forward_sender_name
) )
forward_from_chat != null -> ForwardFromChannelInfo( forward_from_chat is ChannelChat -> ForwardFromChannelInfo(
forward_date, forward_date,
forward_from_message_id ?: throw IllegalStateException("Channel forwarded message must contain message id, but was not"), forward_from_message_id ?: throw IllegalStateException("Channel forwarded message must contain message id, but was not"),
forward_from_chat, forward_from_chat,