From 0baaf9d5874ab90077c493fa98eb91f57d48faf6 Mon Sep 17 00:00:00 2001 From: sandtechnology <20417547+sandtechnology@users.noreply.github.com> Date: Sun, 2 May 2021 13:51:21 +0800 Subject: [PATCH] Correct the seq logic, fix #1094 (#1232) --- .../network/protocol/packet/chat/receive/MessageSvc.PbGetMsg.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/MessageSvc.PbGetMsg.kt b/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/MessageSvc.PbGetMsg.kt index c41ea5cf3..9bf56ac0c 100644 --- a/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/MessageSvc.PbGetMsg.kt +++ b/mirai-core/src/commonMain/kotlin/network/protocol/packet/chat/receive/MessageSvc.PbGetMsg.kt @@ -501,7 +501,7 @@ internal suspend fun MsgComm.Msg.transform(bot: QQAndroidBot, fromSync: Boolean member.checkIsMemberImpl() member.lastMessageSequence.loop { instant -> - if (msgHead.msgSeq > instant) { + if (member.lastMessageSequence.value != msgHead.msgSeq && contentHead?.autoReply != 1) { if (member.lastMessageSequence.compareAndSet(instant, msgHead.msgSeq)) { return if (fromSync) { GroupTempMessageSyncEvent(