mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
Update MediaGroupTriggers.kt
This commit is contained in:
parent
ea19c10f41
commit
be710612b5
@ -22,7 +22,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : MediaGroupConten
|
||||
markerFactory: MarkerFactory<in List<MediaGroupMessage<T>>, Any> = ByChatMediaGroupMarkerFactory,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, List<MediaGroupMessage<T>>>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
(it.asSentMediaGroupUpdate() ?.data ?.takeIf { it.all { it is T } } as? List<MediaGroupMessage<T>>) ?.let(::listOfNotNull)
|
||||
(it.asSentMediaGroupUpdate() ?.data ?.takeIf { it.all { it.content is T } } as? List<MediaGroupMessage<T>>) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user