mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-01-06 21:39:20 +00:00
Compare commits
4 Commits
fb2b912f93
...
v14.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| a3ef66bbfb | |||
| 738728f647 | |||
| abbb4e2dff | |||
| c3fa8a6d33 |
@@ -1,11 +1,11 @@
|
|||||||
# TelegramBotAPI changelog
|
# TelegramBotAPI changelog
|
||||||
|
|
||||||
## 14.0.2
|
## 14.1.0
|
||||||
|
|
||||||
* `Version`:
|
* `Version`:
|
||||||
* `Coroutines`: `1.8.0` -> `1.8.1`
|
* `Coroutines`: `1.8.0` -> `1.8.1`
|
||||||
* `Ktor`: `2.3.10` -> `2.3.11`
|
* `Ktor`: `2.3.10` -> `2.3.11`
|
||||||
* `MicroUtils`: `0.20.45` -> `0.20.52`
|
* `MicroUtils`: `0.20.45` -> `0.21.0`
|
||||||
* `KSLog`: `1.3.3` -> `1.3.4`
|
* `KSLog`: `1.3.3` -> `1.3.4`
|
||||||
* `BehaviourBuilder`:
|
* `BehaviourBuilder`:
|
||||||
* `BehaviourContext` updates listening job will be weakly subscribed. It means that `BehaviourContext` scope will
|
* `BehaviourContext` updates listening job will be weakly subscribed. It means that `BehaviourContext` scope will
|
||||||
|
|||||||
@@ -6,4 +6,4 @@ kotlin.incremental=true
|
|||||||
kotlin.incremental.js=true
|
kotlin.incremental.js=true
|
||||||
|
|
||||||
library_group=dev.inmo
|
library_group=dev.inmo
|
||||||
library_version=14.0.2-preview4
|
library_version=14.1.0
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ ktor = "2.3.11"
|
|||||||
ksp = "1.9.23-1.0.20"
|
ksp = "1.9.23-1.0.20"
|
||||||
kotlin-poet = "1.16.0"
|
kotlin-poet = "1.16.0"
|
||||||
|
|
||||||
microutils = "0.20.52"
|
microutils = "0.21.0"
|
||||||
kslog = "1.3.4"
|
kslog = "1.3.4"
|
||||||
|
|
||||||
versions = "0.51.0"
|
versions = "0.51.0"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.extensions.api
|
package dev.inmo.tgbotapi.extensions.api
|
||||||
|
|
||||||
import dev.inmo.micro_utils.coroutines.LinkedSupervisorJob
|
import dev.inmo.micro_utils.coroutines.LinkedSupervisorJob
|
||||||
|
import dev.inmo.micro_utils.coroutines.LinkedSupervisorScope
|
||||||
import dev.inmo.micro_utils.coroutines.launchSafelyWithoutExceptions
|
import dev.inmo.micro_utils.coroutines.launchSafelyWithoutExceptions
|
||||||
import dev.inmo.tgbotapi.abstracts.*
|
import dev.inmo.tgbotapi.abstracts.*
|
||||||
import dev.inmo.tgbotapi.abstracts.types.WithReplyMarkup
|
import dev.inmo.tgbotapi.abstracts.types.WithReplyMarkup
|
||||||
@@ -54,8 +55,9 @@ suspend fun TelegramBot.handleLiveLocation(
|
|||||||
val updateMessageJob = if (liveTimeMillis == indefiniteLivePeriodDelayMillis) { // do not launch refreshing of message for indefinite live locations
|
val updateMessageJob = if (liveTimeMillis == indefiniteLivePeriodDelayMillis) { // do not launch refreshing of message for indefinite live locations
|
||||||
null
|
null
|
||||||
} else {
|
} else {
|
||||||
CoroutineScope(currentCoroutineContext().LinkedSupervisorJob()).launchSafelyWithoutExceptions(start = CoroutineStart.LAZY) {
|
val scope = currentCoroutineContext().LinkedSupervisorScope()
|
||||||
while (isActive) {
|
scope.launchSafelyWithoutExceptions(start = CoroutineStart.LAZY) {
|
||||||
|
while (scope.isActive) {
|
||||||
delay(liveTimeMillis)
|
delay(liveTimeMillis)
|
||||||
// Remove previous location message info to resend live location message
|
// Remove previous location message info to resend live location message
|
||||||
currentLiveLocationMessage = null
|
currentLiveLocationMessage = null
|
||||||
|
|||||||
Reference in New Issue
Block a user