mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23: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 com.soywiz.klock.DateTime
|
||||||
import dev.inmo.tgbotapi.types.MediaGroupIdentifier
|
import dev.inmo.tgbotapi.types.MediaGroupIdentifier
|
||||||
import dev.inmo.tgbotapi.types.MessageId
|
import dev.inmo.tgbotapi.types.MessageId
|
||||||
|
import dev.inmo.tgbotapi.types.MessageThreadId
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
|
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>(
|
data class ChannelMediaGroupMessage<T : MediaGroupContent>(
|
||||||
override val messageId: MessageId,
|
override val messageId: MessageId,
|
||||||
|
override val threadId: MessageThreadId?,
|
||||||
override val chat: Chat,
|
override val chat: Chat,
|
||||||
override val date: DateTime,
|
override val date: DateTime,
|
||||||
override val mediaGroupId: MediaGroupIdentifier,
|
override val mediaGroupId: MediaGroupIdentifier,
|
||||||
|
@ -10,6 +10,7 @@ import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
|
|||||||
|
|
||||||
data class CommonMediaGroupMessage<T : MediaGroupContent>(
|
data class CommonMediaGroupMessage<T : MediaGroupContent>(
|
||||||
override val messageId: MessageId,
|
override val messageId: MessageId,
|
||||||
|
override val threadId: MessageThreadId?,
|
||||||
override val from: User,
|
override val from: User,
|
||||||
override val chat: Chat,
|
override val chat: Chat,
|
||||||
override val date: DateTime,
|
override val date: DateTime,
|
||||||
|
@ -270,6 +270,7 @@ internal data class RawMessage(
|
|||||||
when (from) {
|
when (from) {
|
||||||
null -> ChannelMediaGroupMessage(
|
null -> ChannelMediaGroupMessage(
|
||||||
messageId,
|
messageId,
|
||||||
|
messageThreadId,
|
||||||
chat,
|
chat,
|
||||||
date.asDate,
|
date.asDate,
|
||||||
it,
|
it,
|
||||||
@ -282,6 +283,7 @@ internal data class RawMessage(
|
|||||||
)
|
)
|
||||||
else -> CommonMediaGroupMessage(
|
else -> CommonMediaGroupMessage(
|
||||||
messageId,
|
messageId,
|
||||||
|
messageThreadId,
|
||||||
from,
|
from,
|
||||||
chat,
|
chat,
|
||||||
date.asDate,
|
date.asDate,
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
package dev.inmo.tgbotapi.types.message.abstracts
|
package dev.inmo.tgbotapi.types.message.abstracts
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.MediaGroupIdentifier
|
import dev.inmo.tgbotapi.types.MediaGroupIdentifier
|
||||||
|
import dev.inmo.tgbotapi.types.MessageThreadId
|
||||||
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
|
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
|
||||||
|
|
||||||
interface MediaGroupMessage<T : MediaGroupContent> : CommonMessage<T> {
|
interface MediaGroupMessage<T : MediaGroupContent> : CommonMessage<T> {
|
||||||
val mediaGroupId: MediaGroupIdentifier
|
val mediaGroupId: MediaGroupIdentifier
|
||||||
|
val threadId: MessageThreadId?
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user