mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
update.
This commit is contained in:
parent
d0639731db
commit
e24921467c
@ -943,44 +943,46 @@ func decodeSystemMsgGroupPacket(c *QQClient, _ uint16, payload []byte) (interfac
|
|||||||
if len(rsp.Groupmsgs) == 0 {
|
if len(rsp.Groupmsgs) == 0 {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
st := rsp.Groupmsgs[0]
|
ret := &GroupSystemMessages{}
|
||||||
if st.Msg != nil {
|
for _, st := range rsp.Groupmsgs {
|
||||||
if st.Msg.SubType == 1 {
|
if st.Msg != nil {
|
||||||
// 处理被邀请入群 或 处理成员入群申请
|
if st.Msg.SubType == 1 {
|
||||||
switch st.Msg.GroupMsgType {
|
// 处理被邀请入群 或 处理成员入群申请
|
||||||
case 1: // 成员申请
|
switch st.Msg.GroupMsgType {
|
||||||
c.dispatchJoinGroupRequest(&UserJoinGroupRequest{
|
case 1: // 成员申请
|
||||||
RequestId: st.MsgSeq,
|
ret.JoinRequests = append(ret.JoinRequests, &UserJoinGroupRequest{
|
||||||
Message: st.Msg.MsgAdditional,
|
RequestId: st.MsgSeq,
|
||||||
RequesterUin: st.ReqUin,
|
Message: st.Msg.MsgAdditional,
|
||||||
RequesterNick: st.Msg.ReqUinNick,
|
RequesterUin: st.ReqUin,
|
||||||
GroupCode: st.Msg.GroupCode,
|
RequesterNick: st.Msg.ReqUinNick,
|
||||||
GroupName: st.Msg.GroupName,
|
GroupCode: st.Msg.GroupCode,
|
||||||
client: c,
|
GroupName: st.Msg.GroupName,
|
||||||
})
|
client: c,
|
||||||
case 2: // 被邀请
|
})
|
||||||
c.dispatchGroupInvitedEvent(&GroupInvitedRequest{
|
case 2: // 被邀请
|
||||||
RequestId: st.MsgSeq,
|
ret.InvitedRequests = append(ret.InvitedRequests, &GroupInvitedRequest{
|
||||||
InvitorUin: st.Msg.ActionUin,
|
RequestId: st.MsgSeq,
|
||||||
InvitorNick: st.Msg.ActionUinNick,
|
InvitorUin: st.Msg.ActionUin,
|
||||||
GroupCode: st.Msg.GroupCode,
|
InvitorNick: st.Msg.ActionUinNick,
|
||||||
GroupName: st.Msg.GroupName,
|
GroupCode: st.Msg.GroupCode,
|
||||||
client: c,
|
GroupName: st.Msg.GroupName,
|
||||||
})
|
client: c,
|
||||||
default:
|
})
|
||||||
|
default:
|
||||||
|
log.Println("unknown group msg:", st)
|
||||||
|
}
|
||||||
|
} else if st.Msg.SubType == 2 {
|
||||||
|
// 被邀请入群, 自动同意, 不需处理
|
||||||
|
} else if st.Msg.SubType == 3 {
|
||||||
|
// 已被其他管理员处理
|
||||||
|
} else if st.Msg.SubType == 5 {
|
||||||
|
// 成员退群消息
|
||||||
|
} else {
|
||||||
log.Println("unknown group msg:", st)
|
log.Println("unknown group msg:", st)
|
||||||
}
|
}
|
||||||
} else if st.Msg.SubType == 2 {
|
|
||||||
// 被邀请入群, 自动同意, 不需处理
|
|
||||||
} else if st.Msg.SubType == 3 {
|
|
||||||
// 已被其他管理员处理
|
|
||||||
} else if st.Msg.SubType == 5 {
|
|
||||||
// 成员退群消息
|
|
||||||
} else {
|
|
||||||
log.Println("unknown group msg:", st)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil, nil
|
return ret, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ProfileService.Pb.ReqSystemMsgNew.Friend
|
// ProfileService.Pb.ReqSystemMsgNew.Friend
|
||||||
|
@ -151,6 +151,11 @@ type (
|
|||||||
Message string
|
Message string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GroupSystemMessages struct {
|
||||||
|
InvitedRequests []*GroupInvitedRequest
|
||||||
|
JoinRequests []*UserJoinGroupRequest
|
||||||
|
}
|
||||||
|
|
||||||
GroupInvitedRequest struct {
|
GroupInvitedRequest struct {
|
||||||
RequestId int64
|
RequestId int64
|
||||||
InvitorUin int64
|
InvitorUin int64
|
||||||
|
Loading…
x
Reference in New Issue
Block a user