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:
commit
9f125ed6a9
@ -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`
|
||||||
|
@ -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 {
|
||||||
|
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user