1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00

FlowUpdatesFilter update

This commit is contained in:
InsanusMokrassar 2020-03-22 17:21:01 +06:00
parent d4c409107a
commit 041232e260
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -29,6 +29,8 @@ class FlowsUpdatesFilter(
private val shippingQueryChannel: BroadcastChannel<ShippingQueryUpdate> = BroadcastChannel(broadcastChannelsSize)
private val preCheckoutQueryChannel: BroadcastChannel<PreCheckoutQueryUpdate> = BroadcastChannel(broadcastChannelsSize)
private val pollChannel: BroadcastChannel<PollUpdate> = BroadcastChannel(broadcastChannelsSize)
private val pollAnswerChannel: BroadcastChannel<PollAnswerUpdate> = BroadcastChannel(broadcastChannelsSize)
private val unknownUpdateChannel: BroadcastChannel<Update> = BroadcastChannel(broadcastChannelsSize)
override val allowedUpdates: List<String>
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<MessageUpdate> = messageChannel.asFlow()
@ -66,4 +70,6 @@ class FlowsUpdatesFilter(
val shippingQueryFlow: Flow<ShippingQueryUpdate> = shippingQueryChannel.asFlow()
val preCheckoutQueryFlow: Flow<PreCheckoutQueryUpdate> = preCheckoutQueryChannel.asFlow()
val pollFlow: Flow<PollUpdate> = pollChannel.asFlow()
val pollAnswerFlow: Flow<PollAnswerUpdate> = pollAnswerChannel.asFlow()
val unknownUpdateTypeFlow: Flow<Update> = unknownUpdateChannel.asFlow()
}