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

Merge pull request #6 from InsanusMokrassar/0.8.3

ForwardedMessage contains nullable "from"
This commit is contained in:
InsanusMokrassar 2019-01-11 11:55:36 +08:00 committed by GitHub
commit 9f125ed6a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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` * Add `CommonMediaGroupMessage` which in fact extension of `MediaGroupMessage` with implementation of `FromUserMessage`
* `CommonMessageImpl` now implementing `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" project.group = "com.github.insanusmokrassar"
buildscript { buildscript {

View File

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