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

improvements in longPolling extension

This commit is contained in:
InsanusMokrassar 2022-05-22 22:36:56 +06:00
parent c870a48a22
commit ad7fdc6211
2 changed files with 5 additions and 2 deletions

View File

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

View File

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