diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b0562004d..b15ed59d41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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___ diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/retrieving/LongPolling.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/retrieving/LongPolling.kt index b0c8550231..421427e2ac 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/retrieving/LongPolling.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/retrieving/LongPolling.kt @@ -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? = null -): Job = flowsUpdatesFilter.run { +): Job = updatesFilter.run { startGettingOfUpdatesByLongPolling(timeoutSeconds, scope, exceptionsHandler, allowedUpdates, asUpdateReceiver) }