diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupTriggers.kt index bb1159668e..b523abbc3a 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupTriggers.kt @@ -22,7 +22,11 @@ internal suspend inline fun >, Any> = ByChatMediaGroupMarkerFactory, noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver>> ) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) { - (it.asSentMediaGroupUpdate() ?.data ?.takeIf { it.all { it.content is T } } as? List>) ?.let(::listOfNotNull) + (it.asSentMediaGroupUpdate() ?.data ?.takeIf { messages -> + messages.all { message -> + message.content is T + } + } as? List>) ?.let(::listOfNotNull) } /**