1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-03-26 07:20:09 +08:00
This commit is contained in:
ryoii 2020-07-08 16:51:16 +08:00
parent a74e895c41
commit becc54dd42

View File

@ -148,22 +148,22 @@ internal class NewContact {
return struct?.msg?.run {
//this.soutv("SystemMsg")
when (subType) {
1 -> { //管理员邀
when (c2cInviteJoinGroupFlag) {
1 -> { // 处理被邀请入群 或 处理成员入群申
when (groupMsgType) {
1 -> {
// 被邀请入群
BotInvitedJoinGroupRequestEvent(
bot, struct.msgSeq, actionUin,
groupCode, groupName, actionUinNick
)
}
0 -> {
// 成员申请入群
MemberJoinRequestEvent(
bot, struct.msgSeq, msgAdditional,
struct.reqUin, groupCode, groupName, reqUinNick
)
}
2 -> {
// 被邀请入群
BotInvitedJoinGroupRequestEvent(
bot, struct.msgSeq, actionUin,
groupCode, groupName, actionUinNick
)
}
else -> throw contextualBugReportException(
"parse SystemMsgNewGroup, subType=1",
this._miraiContentToString(),
@ -171,16 +171,14 @@ internal class NewContact {
)
}
}
2 -> {
// 被邀请入群, 自动同意
2 -> { // 被邀请入群, 自动同意, 不需处理
val group = bot.getNewGroup(groupCode) ?: return null
val invitor = group[actionUin]
BotJoinGroupEvent.Invite(invitor)
}
3 -> {
// 已被请他管理员处理
3 -> { // 已被请他管理员处理
null
}
5 -> {