1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-03-06 10:52:23 +00:00

fix of #1027 and small fix of changelog for #1026

This commit is contained in:
2026-03-03 17:55:40 +06:00
parent e6d6bbdaa0
commit d3c1859338
2 changed files with 7 additions and 2 deletions

View File

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

View File

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