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

adapt raw message for forwarded messages

This commit is contained in:
InsanusMokrassar 2019-04-30 12:41:52 +08:00
parent eb4c31a2a1
commit 7977071d1a

View File

@ -134,8 +134,8 @@ data class RawMessage(
@Transient @Transient
private val forwarded: ForwardedMessage? by lazy { private val forwarded: ForwardedMessage? by lazy {
forward_date ?: return@lazy null // According to the documentation, now any forwarded message contains this field forward_date ?: return@lazy null // According to the documentation, now any forwarded message contains this field
forward_from_message_id ?.let { forward_from ?.let {
forward_from ?: throw IllegalStateException("For common forwarded messages author of original message declared as set up required") forward_from_message_id ?: throw IllegalStateException("For common forwarded messages message id of the original message declared as set up required")
forward_from_chat ?.let { forward_from_chat ?.let {
ForwardedFromChannelMessage( ForwardedFromChannelMessage(
forward_from_message_id, forward_from_message_id,