From 0ccb9c94e73ce10c6a45fcee3fc827e1075874db Mon Sep 17 00:00:00 2001 From: Him188 <Him188@mamoe.net> Date: Fri, 27 Aug 2021 17:53:36 +0800 Subject: [PATCH] Handle possible `MemberLeaveEvent.Kick` for `NewContact.SystemMsgNewGroup, subType=5, groupMsgType=6`, fix #1171 --- .../notice/group/GroupOrMemberListNoticeProcessor.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mirai-core/src/commonMain/kotlin/network/notice/group/GroupOrMemberListNoticeProcessor.kt b/mirai-core/src/commonMain/kotlin/network/notice/group/GroupOrMemberListNoticeProcessor.kt index ee64e41ea..0b5fc456f 100644 --- a/mirai-core/src/commonMain/kotlin/network/notice/group/GroupOrMemberListNoticeProcessor.kt +++ b/mirai-core/src/commonMain/kotlin/network/notice/group/GroupOrMemberListNoticeProcessor.kt @@ -252,6 +252,13 @@ internal class GroupOrMemberListNoticeProcessor( val operator = group[actionUin] ?: return collected += BotLeaveEvent.Kick(operator) } + 6 -> { + // 其他管理员踢出了一个群成员, 测试时能正常解析但没有收到 groupMsgType=6 的消息, 但有 issue 收到这些消息 + // #1429, #1171, #1263 + + // > 这是历史的群系统消息,实际上可以直接进行忽略,其实只是因为缺失了忽略的处理而已 + // https://github.com/mamoe/mirai/issues/1171#issuecomment-907075637 + } else -> { throw contextualBugReportException( "解析 NewContact.SystemMsgNewGroup, subType=5, groupMsgType=$groupMsgType",