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

add: GroupMemberInfo.Gender

This commit is contained in:
Mrs4s 2020-10-02 17:53:27 +08:00
parent afe4132a38
commit 2050e45664
3 changed files with 4 additions and 1 deletions

View File

@ -472,6 +472,7 @@ func (pkt *TroopMemberListRequest) ToBytes() []byte {
func (pkt *TroopMemberInfo) ReadFrom(r *JceReader) {
pkt.MemberUin = r.ReadInt64(0)
pkt.FaceId = r.ReadInt16(1)
pkt.Gender = r.ReadByte(3)
pkt.Nick = r.ReadString(4)
pkt.ShowName = r.ReadString(6)
pkt.Name = r.ReadString(8)

View File

@ -498,6 +498,7 @@ func decodeGroupMemberListResponse(_ *QQClient, _ uint16, payload []byte) (inter
l = append(l, &GroupMemberInfo{
Uin: m.MemberUin,
Nickname: m.Nick,
Gender: m.Gender,
CardName: m.Name,
Level: uint16(m.MemberLevel),
JoinTime: m.JoinTime,
@ -531,6 +532,7 @@ func decodeGroupMemberInfoResponse(c *QQClient, _ uint16, payload []byte) (inter
return &GroupMemberInfo{
Group: group,
Uin: rsp.MemInfo.Uin,
Gender: byte(rsp.MemInfo.Sex),
Nickname: string(rsp.MemInfo.Nick),
CardName: string(rsp.MemInfo.Card),
Level: uint16(rsp.MemInfo.Level),

View File

@ -77,6 +77,7 @@ type (
GroupMemberInfo struct {
Group *GroupInfo
Uin int64
Gender byte
Nickname string
CardName string
Level uint16
@ -251,7 +252,6 @@ const (
AndroidPhone ClientProtocol = 537062845
AndroidPad ClientProtocol = 537062409
AndroidWatch ClientProtocol = 537061176
)
func (g *GroupInfo) UpdateName(newName string) {