mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-22 16:47:13 +00:00
Merge pull request #6 from InsanusMokrassar/0.8.3
ForwardedMessage contains nullable "from"
This commit is contained in:
commit
9f125ed6a9
@ -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`
|
||||
|
@ -1,4 +1,4 @@
|
||||
project.version = "0.8.2"
|
||||
project.version = "0.8.3"
|
||||
project.group = "com.github.insanusmokrassar"
|
||||
|
||||
buildscript {
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user