1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +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
private val forwarded: ForwardedMessage? by lazy {
forward_date ?: return@lazy null // According to the documentation, now any forwarded message contains this field
forward_from_message_id ?.let {
forward_from ?: throw IllegalStateException("For common forwarded messages author of original message declared as set up required")
forward_from ?.let {
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 {
ForwardedFromChannelMessage(
forward_from_message_id,