1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

Update new fields

- Recompiled all pb file (被逼的)
group_info.go:
- GroupInfo added GroupLevel and GroupCreateTime field
- GroupSearchInfo added Memo field
This commit is contained in:
Sam 2021-03-16 20:34:20 +08:00
parent e136c01dfc
commit 9434c74620
No known key found for this signature in database
GPG Key ID: 2057906F881702DD

View File

@ -27,6 +27,16 @@ type (
MemberCount uint16 MemberCount uint16
MaxMemberCount uint16 MaxMemberCount uint16
Members []*GroupMemberInfo Members []*GroupMemberInfo
Uin int64
Code int64
Name string
Memo string
OwnerUin int64
GroupCreateTime uint32
GroupLevel uint32
MemberCount uint16
MaxMemberCount uint16
Members []*GroupMemberInfo
// 最后一条信息的SEQ,只有通过 GetGroupInfo 函数获取的 GroupInfo 才会有 // 最后一条信息的SEQ,只有通过 GetGroupInfo 函数获取的 GroupInfo 才会有
LastMsgSeq int64 LastMsgSeq int64
@ -53,6 +63,7 @@ type (
GroupSearchInfo struct { GroupSearchInfo struct {
Code int64 // 群号 Code int64 // 群号
Name string // 群名 Name string // 群名
Memo string // 简介
} }
) )
@ -211,6 +222,7 @@ func decodeGroupSearchResponse(_ *QQClient, _ *incomingPacketInfo, payload []byt
ret = append(ret, GroupSearchInfo{ ret = append(ret, GroupSearchInfo{
Code: int64(g.GetCode()), Code: int64(g.GetCode()),
Name: g.GetName(), Name: g.GetName(),
Memo: g.GetBrief(),
}) })
} }
return ret, nil return ret, nil
@ -246,6 +258,18 @@ func decodeGroupInfoResponse(c *QQClient, _ *incomingPacketInfo, payload []byte)
Members: []*GroupMemberInfo{}, Members: []*GroupMemberInfo{},
LastMsgSeq: int64(info.GroupInfo.GetGroupCurMsgSeq()), LastMsgSeq: int64(info.GroupInfo.GetGroupCurMsgSeq()),
client: c, client: c,
Uin: int64(*info.GroupInfo.GroupUin),
Code: int64(*info.GroupCode),
Name: string(info.GroupInfo.GroupName),
Memo: string(info.GroupInfo.GroupMemo),
GroupCreateTime: *info.GroupInfo.GroupCreateTime,
GroupLevel: *info.GroupInfo.GroupLevel,
OwnerUin: int64(*info.GroupInfo.GroupOwner),
MemberCount: uint16(*info.GroupInfo.GroupMemberNum),
MaxMemberCount: uint16(*info.GroupInfo.GroupMemberMaxNum),
Members: []*GroupMemberInfo{},
LastMsgSeq: int64(info.GroupInfo.GetGroupCurMsgSeq()),
client: c,
}, nil }, nil
} }
@ -417,3 +441,4 @@ func (m *GroupMemberInfo) CardChangable() bool {
} }
return m.Permission != Owner return m.Permission != Owner
} }