diff --git a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/network/BotSession.kt b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/network/BotSession.kt index 6b9513b18..902c48ff5 100644 --- a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/network/BotSession.kt +++ b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/network/BotSession.kt @@ -21,11 +21,8 @@ import java.io.InputStream */ @UseExperimental(MiraiInternalAPI::class) actual class BotSession internal actual constructor( - bot: Bot, - sessionKey: SessionKey, - socket: DataPacketSocketAdapter, - NetworkScope: CoroutineScope -) : BotSessionBase(bot, sessionKey, socket, NetworkScope) { + bot: Bot +) : BotSessionBase(bot) { suspend inline fun Image.downloadAsStream(): InputStream = download().inputStream() suspend inline fun Image.downloadAsBitmap(): Bitmap = withContext(Dispatchers.IO) { downloadAsStream().use { BitmapFactory.decodeStream(it) } } diff --git a/mirai-core/src/jvmTest/kotlin/mirai/test/packetdebugger/PacketDebugger.kt b/mirai-core/src/jvmTest/kotlin/mirai/test/packetdebugger/PacketDebugger.kt index d447ece49..711b7c582 100644 --- a/mirai-core/src/jvmTest/kotlin/mirai/test/packetdebugger/PacketDebugger.kt +++ b/mirai-core/src/jvmTest/kotlin/mirai/test/packetdebugger/PacketDebugger.kt @@ -316,10 +316,7 @@ internal object DebugNetworkHandler : BotNetworkHandler } override val bot: Bot = Bot(qq, "", coroutineContext) - override val session = BotSession( - bot, sessionKey, - socket, this - ) + override val session = BotSession(bot) override suspend fun login(): LoginResult = LoginResult.SUCCESS