From 041232e2600f6f719a312fed78ea1d7b8a247b68 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 22 Mar 2020 17:21:01 +0600 Subject: [PATCH] FlowUpdatesFilter update --- CHANGELOG.md | 1 + .../TelegramBotAPI/updateshandlers/FlowsUpdatesFilter.kt | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f18ad2b52..e32be3b51a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ * `FlowsUpdatesFilter` now as marked my annotation `FlowPreview` * `PathedFile#fullUrl` now is not `inline` function * `SimpleRequest#json` now is not `inline` and `internal` function + * `FlowsUpdatesFilter` now have two additional flows: `pollAnswerFlow`, `unknownUpdateTypeFlow` ## 0.24.0 diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/FlowsUpdatesFilter.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/FlowsUpdatesFilter.kt index c0cafb4710..ffde4ccb35 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/FlowsUpdatesFilter.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/FlowsUpdatesFilter.kt @@ -29,6 +29,8 @@ class FlowsUpdatesFilter( private val shippingQueryChannel: BroadcastChannel = BroadcastChannel(broadcastChannelsSize) private val preCheckoutQueryChannel: BroadcastChannel = BroadcastChannel(broadcastChannelsSize) private val pollChannel: BroadcastChannel = BroadcastChannel(broadcastChannelsSize) + private val pollAnswerChannel: BroadcastChannel = BroadcastChannel(broadcastChannelsSize) + private val unknownUpdateChannel: BroadcastChannel = BroadcastChannel(broadcastChannelsSize) override val allowedUpdates: List get() = filter.allowedUpdates @@ -49,7 +51,9 @@ class FlowsUpdatesFilter( callbackQueryChannel.createUpdateReceiver(), shippingQueryChannel.createUpdateReceiver(), preCheckoutQueryChannel.createUpdateReceiver(), - pollChannel.createUpdateReceiver() + pollChannel.createUpdateReceiver(), + pollAnswerChannel.createUpdateReceiver(), + unknownUpdateChannel.createUpdateReceiver() ) val messageFlow: Flow = messageChannel.asFlow() @@ -66,4 +70,6 @@ class FlowsUpdatesFilter( val shippingQueryFlow: Flow = shippingQueryChannel.asFlow() val preCheckoutQueryFlow: Flow = preCheckoutQueryChannel.asFlow() val pollFlow: Flow = pollChannel.asFlow() + val pollAnswerFlow: Flow = pollAnswerChannel.asFlow() + val unknownUpdateTypeFlow: Flow = unknownUpdateChannel.asFlow() } \ No newline at end of file