diff --git a/client/group_info.go b/client/group_info.go index 8109e99e..504ea274 100644 --- a/client/group_info.go +++ b/client/group_info.go @@ -19,14 +19,16 @@ import ( type ( GroupInfo struct { - Uin int64 - Code int64 - Name string - Memo string - OwnerUin int64 - MemberCount uint16 - MaxMemberCount uint16 - 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 才会有 LastMsgSeq int64 @@ -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 @@ -236,16 +240,18 @@ func decodeGroupInfoResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) return nil, errors.New("group info not found") } return &GroupInfo{ - Uin: int64(*info.GroupInfo.GroupUin), - Code: int64(*info.GroupCode), - Name: string(info.GroupInfo.GroupName), - Memo: string(info.GroupInfo.GroupMemo), - OwnerUin: int64(*info.GroupInfo.GroupOwner), - MemberCount: uint16(*info.GroupInfo.GroupMemberNum), - MaxMemberCount: uint16(*info.GroupInfo.GroupMemberMaxNum), - Members: []*GroupMemberInfo{}, - LastMsgSeq: int64(info.GroupInfo.GetGroupCurMsgSeq()), - 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 }