1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-06-18 07:45:27 +00:00

fix: new BehaviourContext ignored

This commit is contained in:
Alex 2022-05-02 01:16:24 +03:00 committed by InsanusMokrassar
parent 33fb75a5eb
commit 619c82bb32

View File

@ -128,7 +128,7 @@ suspend fun <T, BC : BehaviourContext> BC.doInSubContextWithUpdatesFilter(
upstreamUpdatesFlow = updatesUpstreamFlow
).run {
withContext(coroutineContext) {
behaviourContextReceiver().also { if (stopOnCompletion) stop() }
(this@run as BC).behaviourContextReceiver().also { if (stopOnCompletion) stop() }
}
}