2022-09-04 07:27:35 +00:00
|
|
|
package dev.inmo.plaguposter.common
|
|
|
|
|
|
|
|
import dev.inmo.tgbotapi.types.ChatId
|
2022-11-17 09:09:10 +00:00
|
|
|
import dev.inmo.tgbotapi.types.FullChatIdentifierSerializer
|
|
|
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
2022-09-04 07:27:35 +00:00
|
|
|
import dev.inmo.tgbotapi.types.MessageIdentifier
|
|
|
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
|
|
|
import kotlinx.serialization.Serializable
|
|
|
|
|
|
|
|
@Serializable
|
|
|
|
data class ShortMessageInfo(
|
2022-11-17 09:09:10 +00:00
|
|
|
@Serializable(FullChatIdentifierSerializer::class)
|
|
|
|
val chatId: IdChatIdentifier,
|
2022-09-04 07:27:35 +00:00
|
|
|
val messageId: MessageIdentifier
|
|
|
|
)
|
|
|
|
|
|
|
|
fun Message.short() = ShortMessageInfo(chat.id, messageId)
|