diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/MessageQQA.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/MessageQQA.kt similarity index 99% rename from mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/MessageQQA.kt rename to mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/MessageQQA.kt index 6fb3d7961..01573d540 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/MessageQQA.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/MessageQQA.kt @@ -1,4 +1,4 @@ -package net.mamoe.mirai.qqandroid.utils +package net.mamoe.mirai.qqandroid.message import kotlinx.io.core.readUInt import net.mamoe.mirai.message.data.* diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/MessageSvc.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/MessageSvc.kt index a47583e6b..9d2ce1c64 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/MessageSvc.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/MessageSvc.kt @@ -21,8 +21,8 @@ import net.mamoe.mirai.qqandroid.network.protocol.data.proto.MsgComm import net.mamoe.mirai.qqandroid.network.protocol.data.proto.MsgSvc import net.mamoe.mirai.qqandroid.network.protocol.data.proto.SyncCookie import net.mamoe.mirai.qqandroid.network.protocol.packet.* -import net.mamoe.mirai.qqandroid.utils.toMessageChain -import net.mamoe.mirai.qqandroid.utils.toRichTextElems +import net.mamoe.mirai.qqandroid.message.toMessageChain +import net.mamoe.mirai.qqandroid.message.toRichTextElems import net.mamoe.mirai.utils.MiraiInternalAPI import net.mamoe.mirai.utils.currentTimeSeconds import kotlin.math.absoluteValue diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.kt index bcd8e3b7c..99875ab37 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.kt @@ -19,7 +19,7 @@ import net.mamoe.mirai.qqandroid.network.protocol.data.proto.ImMsgBody import net.mamoe.mirai.qqandroid.network.protocol.data.proto.MsgOnlinePush import net.mamoe.mirai.qqandroid.network.protocol.packet.IncomingPacketFactory import net.mamoe.mirai.qqandroid.network.protocol.packet.OutgoingPacket -import net.mamoe.mirai.qqandroid.utils.toMessageChain +import net.mamoe.mirai.qqandroid.message.toMessageChain import net.mamoe.mirai.utils.cryptor.contentToString import net.mamoe.mirai.utils.io.discardExact import net.mamoe.mirai.utils.io.read diff --git a/mirai-core-qqandroid/src/jvmTest/kotlin/test/QLogReader.kt b/mirai-core-qqandroid/src/jvmTest/kotlin/test/QLogReader.kt index 1fafcb180..4a9741302 100644 --- a/mirai-core-qqandroid/src/jvmTest/kotlin/test/QLogReader.kt +++ b/mirai-core-qqandroid/src/jvmTest/kotlin/test/QLogReader.kt @@ -16,6 +16,10 @@ object QLogReader { return (decompress(file.readBytes())) } + fun readQLog(file: ByteArray): String { + return (decompress(file)) + } + fun decompress(array: ByteArray): String { return buildString {