mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-11-02 01:42:56 +00:00
FlowsUpdatesFilter#allUpdatesWithoutMediaGroupsGroupingFlow
This commit is contained in:
1 parent
a28cf5ddff
commit
8b79b15777
2 files changed
+11
No files matched your search
+8
@@ -14,6 +14,14 @@ class FlowsUpdatesFilter(
|
||||
private val updatesSharedFlow = MutableSharedFlow<Update>(extraBufferCapacity = broadcastChannelsSize)
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
val allUpdatesFlow: Flow<Update> = updatesSharedFlow.asSharedFlow()
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
val allUpdatesWithoutMediaGroupsGroupingFlow: Flow<Update> = updatesSharedFlow.flatMapConcat {
|
||||
(if (it is SentMediaGroupUpdate) {
|
||||
it.origins
|
||||
} else {
|
||||
listOf(it)
|
||||
}).asFlow()
|
||||
}
|
||||
|
||||
override val allowedUpdates: List<String>
|
||||
get() = ALL_UPDATES_LIST
|
||||
|
||||
Reference in new issue
Block a user