mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
FlowUpdatesFilter update
This commit is contained in:
parent
d4c409107a
commit
041232e260
@ -22,6 +22,7 @@
|
|||||||
* `FlowsUpdatesFilter` now as marked my annotation `FlowPreview`
|
* `FlowsUpdatesFilter` now as marked my annotation `FlowPreview`
|
||||||
* `PathedFile#fullUrl` now is not `inline` function
|
* `PathedFile#fullUrl` now is not `inline` function
|
||||||
* `SimpleRequest#json` now is not `inline` and `internal` function
|
* `SimpleRequest#json` now is not `inline` and `internal` function
|
||||||
|
* `FlowsUpdatesFilter` now have two additional flows: `pollAnswerFlow`, `unknownUpdateTypeFlow`
|
||||||
|
|
||||||
## 0.24.0
|
## 0.24.0
|
||||||
|
|
||||||
|
@ -29,6 +29,8 @@ class FlowsUpdatesFilter(
|
|||||||
private val shippingQueryChannel: BroadcastChannel<ShippingQueryUpdate> = BroadcastChannel(broadcastChannelsSize)
|
private val shippingQueryChannel: BroadcastChannel<ShippingQueryUpdate> = BroadcastChannel(broadcastChannelsSize)
|
||||||
private val preCheckoutQueryChannel: BroadcastChannel<PreCheckoutQueryUpdate> = BroadcastChannel(broadcastChannelsSize)
|
private val preCheckoutQueryChannel: BroadcastChannel<PreCheckoutQueryUpdate> = BroadcastChannel(broadcastChannelsSize)
|
||||||
private val pollChannel: BroadcastChannel<PollUpdate> = 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>
|
override val allowedUpdates: List<String>
|
||||||
get() = filter.allowedUpdates
|
get() = filter.allowedUpdates
|
||||||
@ -49,7 +51,9 @@ class FlowsUpdatesFilter(
|
|||||||
callbackQueryChannel.createUpdateReceiver(),
|
callbackQueryChannel.createUpdateReceiver(),
|
||||||
shippingQueryChannel.createUpdateReceiver(),
|
shippingQueryChannel.createUpdateReceiver(),
|
||||||
preCheckoutQueryChannel.createUpdateReceiver(),
|
preCheckoutQueryChannel.createUpdateReceiver(),
|
||||||
pollChannel.createUpdateReceiver()
|
pollChannel.createUpdateReceiver(),
|
||||||
|
pollAnswerChannel.createUpdateReceiver(),
|
||||||
|
unknownUpdateChannel.createUpdateReceiver()
|
||||||
)
|
)
|
||||||
|
|
||||||
val messageFlow: Flow<MessageUpdate> = messageChannel.asFlow()
|
val messageFlow: Flow<MessageUpdate> = messageChannel.asFlow()
|
||||||
@ -66,4 +70,6 @@ class FlowsUpdatesFilter(
|
|||||||
val shippingQueryFlow: Flow<ShippingQueryUpdate> = shippingQueryChannel.asFlow()
|
val shippingQueryFlow: Flow<ShippingQueryUpdate> = shippingQueryChannel.asFlow()
|
||||||
val preCheckoutQueryFlow: Flow<PreCheckoutQueryUpdate> = preCheckoutQueryChannel.asFlow()
|
val preCheckoutQueryFlow: Flow<PreCheckoutQueryUpdate> = preCheckoutQueryChannel.asFlow()
|
||||||
val pollFlow: Flow<PollUpdate> = pollChannel.asFlow()
|
val pollFlow: Flow<PollUpdate> = pollChannel.asFlow()
|
||||||
|
val pollAnswerFlow: Flow<PollAnswerUpdate> = pollAnswerChannel.asFlow()
|
||||||
|
val unknownUpdateTypeFlow: Flow<Update> = unknownUpdateChannel.asFlow()
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user