From d3be13b6e69d5646de8419109a5a29f094f5c4f2 Mon Sep 17 00:00:00 2001 From: Him188 Date: Thu, 24 Dec 2020 12:06:20 +0800 Subject: [PATCH] Fix package name --- mirai-core/src/commonMain/kotlin/QQAndroidBot.kt | 2 +- .../src/commonMain/kotlin/contact/OtherClientImpl.kt | 2 +- .../kotlin/network/protocol/data/jce/InstanceInfo.kt | 2 +- .../protocol/data/jce/SvcReqMSFLoginNotifyData.kt | 2 +- .../kotlin/network/protocol/packet/login/StatSvc.kt | 9 +++------ 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/mirai-core/src/commonMain/kotlin/QQAndroidBot.kt b/mirai-core/src/commonMain/kotlin/QQAndroidBot.kt index 0fc8e6f92..047658aa9 100644 --- a/mirai-core/src/commonMain/kotlin/QQAndroidBot.kt +++ b/mirai-core/src/commonMain/kotlin/QQAndroidBot.kt @@ -23,11 +23,11 @@ import net.mamoe.mirai.internal.contact.checkIsGroupImpl import net.mamoe.mirai.internal.message.* import net.mamoe.mirai.internal.network.QQAndroidBotNetworkHandler import net.mamoe.mirai.internal.network.QQAndroidClient +import net.mamoe.mirai.internal.network.protocol.data.jce.InstanceInfo import net.mamoe.mirai.internal.network.protocol.packet.chat.* import net.mamoe.mirai.message.data.* import net.mamoe.mirai.network.LoginFailedException import net.mamoe.mirai.utils.* -import network.protocol.data.jce.InstanceInfo import kotlin.contracts.contract import kotlin.coroutines.CoroutineContext import net.mamoe.mirai.internal.network.protocol.data.jce.FriendInfo as JceFriendInfo diff --git a/mirai-core/src/commonMain/kotlin/contact/OtherClientImpl.kt b/mirai-core/src/commonMain/kotlin/contact/OtherClientImpl.kt index c853c2ae1..8a433bfd0 100644 --- a/mirai-core/src/commonMain/kotlin/contact/OtherClientImpl.kt +++ b/mirai-core/src/commonMain/kotlin/contact/OtherClientImpl.kt @@ -12,12 +12,12 @@ package net.mamoe.mirai.internal.contact import net.mamoe.mirai.Bot import net.mamoe.mirai.contact.ClientKind import net.mamoe.mirai.contact.OtherClient +import net.mamoe.mirai.internal.network.protocol.data.jce.InstanceInfo import net.mamoe.mirai.message.MessageReceipt import net.mamoe.mirai.message.data.Image import net.mamoe.mirai.message.data.Message import net.mamoe.mirai.utils.ExternalImage import net.mamoe.mirai.utils.cast -import network.protocol.data.jce.InstanceInfo import kotlin.coroutines.CoroutineContext internal val OtherClient.instanceInfo: InstanceInfo get() = this.cast().instanceInfo diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/InstanceInfo.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/InstanceInfo.kt index d432c9499..191cbc10e 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/InstanceInfo.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/InstanceInfo.kt @@ -7,7 +7,7 @@ * https://github.com/mamoe/mirai/blob/master/LICENSE */ -package network.protocol.data.jce +package net.mamoe.mirai.internal.network.protocol.data.jce import kotlinx.serialization.Serializable import net.mamoe.mirai.contact.ClientKind diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcReqMSFLoginNotifyData.kt b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcReqMSFLoginNotifyData.kt index c9c47ddb0..b1d8dc407 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcReqMSFLoginNotifyData.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/data/jce/SvcReqMSFLoginNotifyData.kt @@ -7,7 +7,7 @@ * https://github.com/mamoe/mirai/blob/master/LICENSE */ -package network.protocol.data.jce +package net.mamoe.mirai.internal.network.protocol.data.jce import kotlinx.serialization.Serializable import net.mamoe.mirai.internal.utils.io.JceStruct diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/packet/login/StatSvc.kt b/mirai-core/src/commonMain/kotlin/network/protocol/packet/login/StatSvc.kt index 45b8d3e35..9e279895c 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/packet/login/StatSvc.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/packet/login/StatSvc.kt @@ -23,10 +23,7 @@ import net.mamoe.mirai.internal.message.contextualBugReportException import net.mamoe.mirai.internal.network.Packet import net.mamoe.mirai.internal.network.QQAndroidClient import net.mamoe.mirai.internal.network.guid -import net.mamoe.mirai.internal.network.protocol.data.jce.RequestMSFForceOffline -import net.mamoe.mirai.internal.network.protocol.data.jce.RequestPacket -import net.mamoe.mirai.internal.network.protocol.data.jce.RspMSFForceOffline -import net.mamoe.mirai.internal.network.protocol.data.jce.SvcReqRegister +import net.mamoe.mirai.internal.network.protocol.data.jce.* import net.mamoe.mirai.internal.network.protocol.data.proto.Oidb0x769 import net.mamoe.mirai.internal.network.protocol.data.proto.StatSvcGetOnline import net.mamoe.mirai.internal.network.protocol.packet.* @@ -201,7 +198,7 @@ internal class StatSvc { return BotOfflineEvent.MsfOffline(bot, MsfOfflineToken(decodeUniPacket.uin, decodeUniPacket.iSeqno, 0)) } - override suspend fun QQAndroidBot.handle(packet: BotOfflineEvent.MsfOffline, sequenceId: Int): OutgoingPacket? { + override suspend fun QQAndroidBot.handle(packet: BotOfflineEvent.MsfOffline, sequenceId: Int): OutgoingPacket { val cause = packet.cause check(cause is MsfOfflineToken) { "internal error: handling $packet in StatSvc.ReqMSFOffline" } return buildResponseUniPacket(client) { @@ -231,7 +228,7 @@ internal class StatSvc { override suspend fun ByteReadPacket.decode(bot: QQAndroidBot, sequenceId: Int): Packet? = bot.otherClientsLock.withLock { - val notify = readUniPacket(network.protocol.data.jce.SvcReqMSFLoginNotifyData.serializer()) + val notify = readUniPacket(SvcReqMSFLoginNotifyData.serializer()) val kind = notify.iClientType?.toInt()?.let(ClientKind::get) ?: return null