diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/subscribeMessages.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/subscribeMessages.kt index 61cea61ce..4d5a32f04 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/subscribeMessages.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/subscribeMessages.kt @@ -173,7 +173,7 @@ inline fun CoroutineScope.incoming( capacity: Int = Channel.UNLIMITED ): ReceiveChannel { return Channel(capacity).apply { - val listener = subscribeAlways(coroutineContext) { + val listener = this@incoming.subscribeAlways(coroutineContext) { send(this) } this.invokeOnClose {