diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/MessageSourceFromMsg.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/MessageSourceFromMsg.kt index f966bc71b..540186716 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/MessageSourceFromMsg.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/MessageSourceFromMsg.kt @@ -10,7 +10,6 @@ package net.mamoe.mirai.qqandroid.message import net.mamoe.mirai.contact.Group -import net.mamoe.mirai.message.data.MessageChain import net.mamoe.mirai.message.data.MessageSource import net.mamoe.mirai.qqandroid.io.serialization.loadAs import net.mamoe.mirai.qqandroid.io.serialization.toByteArray @@ -29,7 +28,7 @@ internal inline class MessageSourceFromServer( } override val messageUid: Long get() = delegate.pbReserve.loadAs(SourceMsg.ResvAttr.serializer()).origUids!! - override val sourceMessage: MessageChain get() = delegate.toMessageChain() + // override val sourceMessage: MessageChain get() = delegate.toMessageChain() override val senderId: Long get() = delegate.senderUin override val groupId: Long get() = Group.calculateGroupCodeByGroupUin(delegate.toUin) @@ -46,7 +45,7 @@ internal inline class MessageSourceFromMsg( } override val messageUid: Long get() = delegate.msgBody.richText.attr!!.random.toLong() - override val sourceMessage: MessageChain get() = delegate.toMessageChain() + // override val sourceMessage: MessageChain get() = delegate.toMessageChain() override val senderId: Long get() = delegate.msgHead.fromUin override val groupId: Long get() = delegate.msgHead.groupInfo!!.groupCode 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 9d415b113..94e37d2fa 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 @@ -275,10 +275,10 @@ internal class MessageSvc { override val messageUid: Long, override val time: Long, override val senderId: Long, - override val groupId: Long, - override val sourceMessage: MessageChain + override val groupId: Long// , + // override val sourceMessage: MessageChain ) : MessageSource { - lateinit var sequenceIdDeferred: Deferred + private lateinit var sequenceIdDeferred: Deferred @UseExperimental(MiraiExperimentalAPI::class) fun startWaitingSequenceId(contact: Contact) { @@ -317,8 +317,8 @@ internal class MessageSvc { messageUid = Random.nextInt().absoluteValue.toLong() and 0xffffffff, senderId = client.uin, time = currentTimeSeconds + client.timeDifference, - groupId = 0, - sourceMessage = message + groupId = 0// + // sourceMessage = message ) message.addOrRemove(source) @@ -354,8 +354,8 @@ internal class MessageSvc { messageUid = Random.nextInt().absoluteValue.toLong(), senderId = client.uin, time = currentTimeSeconds + client.timeDifference, - groupId = groupCode, - sourceMessage = message + groupId = groupCode//, + // sourceMessage = message ) ///writeFully("0A 08 0A 06 08 89 FC A6 8C 0B 12 06 08 01 10 00 18 00 1A 1F 0A 1D 12 08 0A 06 0A 04 F0 9F 92 A9 12 11 AA 02 0E 88 01 00 9A 01 08 78 00 F8 01 00 C8 02 00 20 9B 7A 28 F4 CA 9B B8 03 32 34 08 92 C2 C4 F1 05 10 92 C2 C4 F1 05 18 E6 ED B9 C3 02 20 89 FE BE A4 06 28 89 84 F9 A2 06 48 DE 8C EA E5 0E 58 D9 BD BB A0 09 60 1D 68 92 C2 C4 F1 05 70 00 40 01".hexToBytes()) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageSource.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageSource.kt index e0b7239dc..467802330 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageSource.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageSource.kt @@ -58,11 +58,6 @@ interface MessageSource : Message { */ val groupId: Long - /** - * 原消息内容 - */ - val sourceMessage: MessageChain - /** * 固定返回空字符串 ("") */