mirror of
https://github.com/InsanusMokrassar/TelegramBotApiLibraries.git
synced 2024-11-17 22:03:51 +00:00
19 lines
632 B
Kotlin
19 lines
632 B
Kotlin
|
package dev.inmo.tgbotapi.libraries.resender
|
||
|
|
||
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||
|
import dev.inmo.tgbotapi.types.MessageId
|
||
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||
|
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyMediaGroupMessage
|
||
|
import kotlinx.serialization.Serializable
|
||
|
|
||
|
@Serializable
|
||
|
data class MessageMetaInfo(
|
||
|
val chatId: IdChatIdentifier,
|
||
|
val messageId: MessageId,
|
||
|
val group: String? = null
|
||
|
)
|
||
|
|
||
|
operator fun MessageMetaInfo.Companion.invoke(
|
||
|
message: Message
|
||
|
) = MessageMetaInfo(message.chat.id, message.messageId, (message as? PossiblyMediaGroupMessage<*>) ?.mediaGroupId)
|