mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-23 00:57:13 +00:00
adapt raw message for forwarded messages
This commit is contained in:
parent
eb4c31a2a1
commit
7977071d1a
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user