1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-09-19 07:14:23 +00:00

Compare commits

...

3 Commits

3 changed files with 21 additions and 9 deletions

View File

@@ -2,6 +2,18 @@
## 14.0.2
* `Version`:
* `Coroutines`: `1.8.0` -> `1.8.1`
* `Ktor`: `2.3.10` -> `2.3.11`
* `MicroUtils`: `0.20.45` -> `0.20.52`
* `KSLog`: `1.3.3` -> `1.3.4`
* `BehaviourBuilder`:
* `BehaviourContext` updates listening job will be weakly subscribed. It means that `BehaviourContext` scope will
not be prevented from cancelling by this job anymore
* `BehaviourContext.doInContext` will not stop automatically current `BehaviourContext` job anymore
* `BehaviourContext.createSubContextAndDoWithUpdatesFilter` will use `supervisorScope` instead of
`LinkedSupervisorScope`. That will prevent scope leaking in runtime
## 14.0.1
* In `core` and `api` modules related to invoices changed their APIs to suite current API

View File

@@ -2,19 +2,19 @@
kotlin = "1.9.23"
kotlin-serialization = "1.6.3"
kotlin-coroutines = "1.8.0"
kotlin-coroutines = "1.8.1"
javax-activation = "1.1.1"
korlibs = "5.4.0"
uuid = "0.8.4"
ktor = "2.3.10"
ktor = "2.3.11"
ksp = "1.9.23-1.0.20"
kotlin-poet = "1.16.0"
microutils = "0.20.45"
kslog = "1.3.3"
microutils = "0.20.52"
kslog = "1.3.4"
versions = "0.51.0"

View File

@@ -87,7 +87,7 @@ class DefaultBehaviourContext(
} else {
it
}
}.accumulatorFlow(scope)
}.accumulatorFlow(WeakScope(scope))
override val asUpdateReceiver: UpdateReceiver<Update> = additionalUpdatesSharedFlow::emit
override fun copy(
@@ -132,6 +132,8 @@ fun <BC : BehaviourContext> BC.createSubContext(
/**
* Launch [behaviourContextReceiver] in context of [this] as [BehaviourContext] and as [kotlin.coroutines.CoroutineContext]
*
* [this] [BehaviourContext] will **NOT** be closed automatically
*/
suspend fun <T, BC : BehaviourContext> BC.doInContext(
behaviourContextReceiver: CustomBehaviourContextReceiver<BC, T>
@@ -152,12 +154,10 @@ suspend fun <T, BC : BehaviourContext> BC.createSubContextAndDoWithUpdatesFilter
): T {
return supervisorScope {
createSubContext(
scope = this,
scope = this@supervisorScope,
triggersHolder = triggersHolder,
updatesUpstreamFlow = updatesUpstreamFlow
).doInContext(
behaviourContextReceiver = behaviourContextReceiver
)
).behaviourContextReceiver()
}
}