Skip to content

Commit eb0bf21

Browse files
committed
Fix FriendMessageSyncEvent, fix #1624
1 parent bd65ac9 commit eb0bf21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mirai-core/src/commonMain/kotlin/network/notice/priv/PrivateMessageProcessor.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ internal class PrivateMessageProcessor : SimpleNoticeProcessor<MsgComm.Msg>(type
7474
// Bot send message to himself? or from other client? I am not the implementer.
7575

7676
// This was `bot.client.sendFriendMessageSeq.updateIfSmallerThan(msgHead.msgSeq)`,
77-
// changed to `if (!bot.client.sendFriendMessageSeq.updateIfSmallerThan(msgHead.msgSeq)) return`
77+
// changed to `if (!bot.client.sendFriendMessageSeq.updateIfDifferentWith(msgHead.msgSeq)) return`
7878
// in 2021/12/20, 2.10.0-RC, 2.8.4, 2.9.0
7979
// to fix 好友无法消息同步(FriendMessageSyncEvent) #1624
8080
// Relevant tests: `MessageSyncTest`
81-
if (!bot.client.sendFriendMessageSeq.updateIfSmallerThan(msgHead.msgSeq)) return
81+
if (!bot.client.sendFriendMessageSeq.updateIfDifferentWith(msgHead.msgSeq)) return
8282
}
8383

8484
if (!bot.components[SsoProcessor].firstLoginSucceed) return

0 commit comments

Comments
 (0)