1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-26 10:37:13 +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`:
* All suspend functions for `RequestsExecutor` was removed (due to replacement into
[TelegramBotAPI extensions project](TelegramBotAPI-extensions-api/README.md))
* `ForwardFromChannelInfo#channelChat` now is `ChannelChat` instead of `Chat`
* `TelegramBotAPI-extensions-api`:
* 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
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.ChannelChat
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
@Deprecated(
@ -52,6 +53,6 @@ typealias ForwardedFromChannelMessage = ForwardFromChannelInfo
data class ForwardFromChannelInfo(
override val dateOfOriginal: TelegramDate,
val messageId: MessageIdentifier,
val channelChat: Chat,
val channelChat: ChannelChat,
val signature: String? = null
) : ForwardInfo()

View File

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