mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-23 00:57:13 +00:00
media group messages refactoring
This commit is contained in:
parent
15686f742a
commit
ed341c231d
@ -42,6 +42,8 @@ for receivers.
|
||||
|
||||
* Refactor, optimizing and cleaning of code
|
||||
* Removed deprecated method `T#toJsonWithoutNulls()`
|
||||
* Renamed instances of `MediaGroupMessage`s and refactored their interfaces. `ChannelMediaGroupMessage`
|
||||
will not contain `user` field (but `CommonMediaGroupMessage` will have)
|
||||
|
||||
## 0.11.0
|
||||
|
||||
|
@ -8,7 +8,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Messag
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MediaGroupContent
|
||||
import org.joda.time.DateTime
|
||||
|
||||
data class MediaGroupMessage(
|
||||
data class ChannelMediaGroupMessage(
|
||||
override val messageId: MessageIdentifier,
|
||||
override val chat: Chat,
|
||||
override val date: DateTime,
|
||||
@ -17,4 +17,4 @@ data class MediaGroupMessage(
|
||||
override val editDate: DateTime?,
|
||||
override val forwarded: ForwardedMessage?,
|
||||
override val replyTo: Message?
|
||||
) : Message, MediaGroupMessage
|
||||
) : MediaGroupMessage
|
@ -17,4 +17,4 @@ data class CommonMediaGroupMessage(
|
||||
override val editDate: DateTime?,
|
||||
override val forwarded: ForwardedMessage?,
|
||||
override val replyTo: Message?
|
||||
) : Message, MediaGroupMessage, FromUserMessage
|
||||
) : MediaGroupMessage, FromUserMessage
|
||||
|
@ -210,7 +210,7 @@ data class RawMessage(
|
||||
content ->
|
||||
media_group_id ?.let {
|
||||
when (from) {
|
||||
null -> MediaGroupMessage(
|
||||
null -> ChannelMediaGroupMessage(
|
||||
messageId,
|
||||
chat,
|
||||
date.asDate,
|
||||
|
Loading…
Reference in New Issue
Block a user