mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-03-06 10:52:23 +00:00
@@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
## 31.2.0
|
## 31.2.0
|
||||||
|
|
||||||
|
* `Core`:
|
||||||
|
* Potentially fix [#1027](https://github.com/InsanusMokrassar/ktgbotapi/issues/1027) - drop http request exceptions on getting updates
|
||||||
* `Core` + `API`:
|
* `Core` + `API`:
|
||||||
* Add `supportsStreaming` in places it haven't been supported.
|
* Add `supportsStreaming` in places it haven't been supported (fix of [#1026](https://github.com/InsanusMokrassar/ktgbotapi/issues/1026))
|
||||||
* **PARTIALLY BREAKING CHANGE** `supportStreaming` has been renamed to `supportsStreaming`
|
* **PARTIALLY BREAKING CHANGE** `supportStreaming` has been renamed to `supportsStreaming`
|
||||||
|
|
||||||
## 31.1.0
|
## 31.1.0
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package dev.inmo.tgbotapi.extensions.utils.updates.retrieving
|
package dev.inmo.tgbotapi.extensions.utils.updates.retrieving
|
||||||
|
|
||||||
|
import dev.inmo.kslog.common.e
|
||||||
import dev.inmo.micro_utils.coroutines.*
|
import dev.inmo.micro_utils.coroutines.*
|
||||||
import dev.inmo.tgbotapi.bot.RequestsExecutor
|
import dev.inmo.tgbotapi.bot.RequestsExecutor
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
@@ -122,7 +123,7 @@ fun TelegramBot.longPollingFlow(
|
|||||||
|
|
||||||
withContext(contextToWork) {
|
withContext(contextToWork) {
|
||||||
while (isActive) {
|
while (isActive) {
|
||||||
runCatchingLogging(logger = Log) {
|
runCatching {
|
||||||
execute(
|
execute(
|
||||||
getUpdatesRequestCreator(lastUpdateIdentifier ?.plus(1))
|
getUpdatesRequestCreator(lastUpdateIdentifier ?.plus(1))
|
||||||
).let { originalUpdates ->
|
).let { originalUpdates ->
|
||||||
@@ -136,6 +137,8 @@ fun TelegramBot.longPollingFlow(
|
|||||||
return@onFailure
|
return@onFailure
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log.e(e) { "Error during getting and handling of updates happen" }
|
||||||
|
|
||||||
exceptionsHandler?.invoke(e)
|
exceptionsHandler?.invoke(e)
|
||||||
|
|
||||||
// It seems some problems with internet connection. See https://github.com/InsanusMokrassar/ktgbotapi/issues/989
|
// It seems some problems with internet connection. See https://github.com/InsanusMokrassar/ktgbotapi/issues/989
|
||||||
|
|||||||
Reference in New Issue
Block a user