mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +00:00
add support of message thread id in media group messages
This commit is contained in:
parent
867a46d397
commit
1ed620df85
@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.types.message
|
||||
import com.soywiz.klock.DateTime
|
||||
import dev.inmo.tgbotapi.types.MediaGroupIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageId
|
||||
import dev.inmo.tgbotapi.types.MessageThreadId
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
|
||||
@ -11,6 +12,7 @@ import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
|
||||
|
||||
data class ChannelMediaGroupMessage<T : MediaGroupContent>(
|
||||
override val messageId: MessageId,
|
||||
override val threadId: MessageThreadId?,
|
||||
override val chat: Chat,
|
||||
override val date: DateTime,
|
||||
override val mediaGroupId: MediaGroupIdentifier,
|
||||
|
@ -10,6 +10,7 @@ import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
|
||||
|
||||
data class CommonMediaGroupMessage<T : MediaGroupContent>(
|
||||
override val messageId: MessageId,
|
||||
override val threadId: MessageThreadId?,
|
||||
override val from: User,
|
||||
override val chat: Chat,
|
||||
override val date: DateTime,
|
||||
|
@ -270,6 +270,7 @@ internal data class RawMessage(
|
||||
when (from) {
|
||||
null -> ChannelMediaGroupMessage(
|
||||
messageId,
|
||||
messageThreadId,
|
||||
chat,
|
||||
date.asDate,
|
||||
it,
|
||||
@ -282,6 +283,7 @@ internal data class RawMessage(
|
||||
)
|
||||
else -> CommonMediaGroupMessage(
|
||||
messageId,
|
||||
messageThreadId,
|
||||
from,
|
||||
chat,
|
||||
date.asDate,
|
||||
|
@ -1,8 +1,10 @@
|
||||
package dev.inmo.tgbotapi.types.message.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.types.MediaGroupIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageThreadId
|
||||
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
|
||||
|
||||
interface MediaGroupMessage<T : MediaGroupContent> : CommonMessage<T> {
|
||||
val mediaGroupId: MediaGroupIdentifier
|
||||
val threadId: MessageThreadId?
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user