1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-22 16:47:13 +00:00

ForwardedMessage contains nullable "from"

This commit is contained in:
InsanusMokrassar 2019-01-11 11:54:51 +08:00
parent 5c67ea1325
commit 0f5ee669d8
3 changed files with 7 additions and 3 deletions

View File

@ -12,3 +12,6 @@
* Add `CommonMediaGroupMessage` which in fact extension of `MediaGroupMessage` with implementation of `FromUserMessage`
* `CommonMessageImpl` now implementing `FromUserMessage`
## 0.8.3
* Now `ForwardedMessage` contains nullable `from`

View File

@ -1,4 +1,4 @@
project.version = "0.8.2"
project.version = "0.8.3"
project.group = "com.github.insanusmokrassar"
buildscript {

View File

@ -6,18 +6,19 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.chat.Chat
sealed class ForwardedMessage {
abstract val messageId: MessageIdentifier
abstract val dateOfOriginal: TelegramDate
abstract val from: User?
}
data class CommonForwardedMessage(
override val messageId: MessageIdentifier,
override val dateOfOriginal: TelegramDate,
val from: User
override val from: User
) : ForwardedMessage()
data class ForwardedFromChannelMessage(
override val messageId: MessageIdentifier,
override val dateOfOriginal: TelegramDate,
val from: User?,
override val from: User?,
val channelChat: Chat,
val signature: String? = null
) : ForwardedMessage()