From db14eee3b6c7d2b5d01a75b8aaecc9bdafaa0d8e Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 2 May 2022 01:16:24 +0300 Subject: [PATCH] fix: new BehaviourContext ignored --- .../tgbotapi/extensions/behaviour_builder/BehaviourContext.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext.kt index 2426853a51..ccc6ccbbd5 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext.kt @@ -128,7 +128,7 @@ suspend fun BC.doInSubContextWithUpdatesFilter( upstreamUpdatesFlow = updatesUpstreamFlow ).run { withContext(coroutineContext) { - behaviourContextReceiver().also { if (stopOnCompletion) stop() } + (this@run as BC).behaviourContextReceiver().also { if (stopOnCompletion) stop() } } }