From 4e5546083442234fcfbacfcd94c3165c68a4152f Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 3 Apr 2021 15:05:25 +0600 Subject: [PATCH] fix in doInSubContext --- .../tgbotapi/extensions/behaviour_builder/BehaviourContext.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext.kt b/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext.kt index 4ff49827ce..109ef09513 100644 --- a/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext.kt +++ b/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext.kt @@ -57,10 +57,10 @@ suspend fun BehaviourContext.doInSubContextWithUpdatesFilter( ) = doInSubContextWithFlowsUpdatesFilterSetup( newFlowsUpdatesFilterSetUp = updatesFilter ?.let { { oldOne -> - oldOne.allUpdatesFlow.filter { updatesFilter(it) }.subscribeSafelyWithoutExceptions(scope, asUpdateReceiver) + oldOne.allUpdatesFlow.filter { updatesFilter(it) }.subscribeSafelyWithoutExceptions(this, asUpdateReceiver) } } ?: { oldOne -> - oldOne.allUpdatesFlow.subscribeSafelyWithoutExceptions(scope, asUpdateReceiver) + oldOne.allUpdatesFlow.subscribeSafelyWithoutExceptions(this, asUpdateReceiver) }, stopOnCompletion, behaviourContextReceiver