1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-08 21:15:57 +08:00

Merge pull request #136 from sam01101/master

Update new fields
This commit is contained in:
Mrs4s 2021-03-20 21:24:57 +08:00 committed by GitHub
commit 5075642842
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,8 @@ type (
Name string
Memo string
OwnerUin int64
GroupCreateTime uint32
GroupLevel uint32
MemberCount uint16
MaxMemberCount uint16
Members []*GroupMemberInfo
@ -53,6 +55,7 @@ type (
GroupSearchInfo struct {
Code int64 // 群号
Name string // 群名
Memo string // 简介
}
)
@ -211,6 +214,7 @@ func decodeGroupSearchResponse(_ *QQClient, _ *incomingPacketInfo, payload []byt
ret = append(ret, GroupSearchInfo{
Code: int64(g.GetCode()),
Name: g.GetName(),
Memo: g.GetBrief(),
})
}
return ret, nil
@ -240,6 +244,8 @@ func decodeGroupInfoResponse(c *QQClient, _ *incomingPacketInfo, payload []byte)
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),
@ -417,3 +423,4 @@ func (m *GroupMemberInfo) CardChangable() bool {
}
return m.Permission != Owner
}