diff --git a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/SentMessageUpdatesConversations.kt b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/SentMessageUpdatesConversations.kt index 533488ed3e..29897d31aa 100644 --- a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/SentMessageUpdatesConversations.kt +++ b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/SentMessageUpdatesConversations.kt @@ -2,6 +2,7 @@ package dev.inmo.tgbotapi.extensions.utils.updates +import dev.inmo.tgbotapi.types.message.PassportMessage import dev.inmo.tgbotapi.types.message.abstracts.* import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate import kotlinx.coroutines.flow.Flow @@ -26,6 +27,11 @@ inline fun Flow.chatEvents() = mapNotNull { it.data as? ChatEventMessage<*> } +@Suppress("NOTHING_TO_INLINE") +inline fun Flow.passportMessages() = mapNotNull { + it.data as? PassportMessage +} + /** * Will map incoming [BaseSentMessageUpdate]s to [UnknownMessageType] from [BaseSentMessageUpdate.data] */