mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-25 19:48:43 +00:00
improvements in longPolling extension
This commit is contained in:
parent
c870a48a22
commit
ad7fdc6211
@ -2,6 +2,9 @@
|
||||
|
||||
## 2.0.1
|
||||
|
||||
* `Utils`:
|
||||
* `TelegramBot#longPolling` now accepts `UpdatesFilter` instead of `FlowsUpdatesFilter`
|
||||
|
||||
## 2.0.0
|
||||
|
||||
___ALL PREVIOUS DEPRECATIONS HAVE BEEN REMOVED___
|
||||
|
@ -166,11 +166,11 @@ suspend fun TelegramBot.flushAccumulatedUpdates(
|
||||
* all updates receivers, because this method will trigger getting of updates and.
|
||||
*/
|
||||
fun TelegramBot.longPolling(
|
||||
flowsUpdatesFilter: FlowsUpdatesFilter,
|
||||
updatesFilter: UpdatesFilter,
|
||||
timeoutSeconds: Seconds = 30,
|
||||
scope: CoroutineScope = CoroutineScope(Dispatchers.Default),
|
||||
exceptionsHandler: ExceptionHandler<Unit>? = null
|
||||
): Job = flowsUpdatesFilter.run {
|
||||
): Job = updatesFilter.run {
|
||||
startGettingOfUpdatesByLongPolling(timeoutSeconds, scope, exceptionsHandler, allowedUpdates, asUpdateReceiver)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user