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