diff --git a/client/entity/group.go b/client/entity/group.go index 844230f..f92c27a 100644 --- a/client/entity/group.go +++ b/client/entity/group.go @@ -63,6 +63,7 @@ type ( GroupLevel uint32 MemberCount uint32 MaxMember uint32 + LastMsgSeq uint32 } UserJoinGroupRequest struct { diff --git a/client/operation.go b/client/operation.go index d5458c6..b6aca4a 100644 --- a/client/operation.go +++ b/client/operation.go @@ -581,7 +581,7 @@ func (c *QQClient) FetchUserInfoUin(uin uint32) (*entity.User, error) { return oidb2.ParseFetchUserInfoResp(resp) } -// FetchGroupInfo 获取群信息 +// FetchGroupInfo 获取群信息 isStrange是否陌生群聊 func (c *QQClient) FetchGroupInfo(groupUin uint32, isStrange bool) (*entity.Group, error) { pkt, err := oidb2.BuildFetchGroupReq(groupUin, isStrange) if err != nil { @@ -604,6 +604,7 @@ func (c *QQClient) FetchGroupInfo(groupUin uint32, isStrange bool) (*entity.Grou GroupLevel: groupResp.GroupLevel, MemberCount: groupResp.GroupMemberNum, MaxMember: groupResp.GroupMemberMaxNum, + LastMsgSeq: groupResp.GroupCurMsgSeq, }, nil } diff --git a/client/packets/oidb/fetch_group.go b/client/packets/oidb/fetch_group.go index 01b1941..cc34bdf 100644 --- a/client/packets/oidb/fetch_group.go +++ b/client/packets/oidb/fetch_group.go @@ -31,6 +31,8 @@ func BuildFetchGroupReq(groupUin uint32, isStrange bool) (*Packet, error) { GroupFingerMemo: proto.Some(""), GroupClassText: proto.Some(""), GroupUin: proto.Some(true), + GroupCurMsgSeq: proto.Some(true), + GroupLastMsgTime: proto.Some(true), GroupQuestion: proto.Some(""), GroupAnswer: proto.Some(""), GroupGrade: proto.Some(true), diff --git a/client/packets/pb/service/oidb/OidbSvcTrpcTcp0x88D_0.pb.go b/client/packets/pb/service/oidb/OidbSvcTrpcTcp0x88D_0.pb.go index 7bca17f..eaf80db 100644 --- a/client/packets/pb/service/oidb/OidbSvcTrpcTcp0x88D_0.pb.go +++ b/client/packets/pb/service/oidb/OidbSvcTrpcTcp0x88D_0.pb.go @@ -61,11 +61,11 @@ type D88DGroupInfo struct { GroupClassText proto.Option[string] `protobuf:"bytes,18,opt"` // repeated bool GroupAllianceCode = 19; // optional bool GroupExtraAadmNum = 20; - GroupUin proto.Option[bool] `protobuf:"varint,21,opt"` - // optional bool GroupCurMsgSeq = 22; - // optional bool GroupLastMsgTime = 23; - GroupQuestion proto.Option[string] `protobuf:"bytes,24,opt"` - GroupAnswer proto.Option[string] `protobuf:"bytes,25,opt"` + GroupUin proto.Option[bool] `protobuf:"varint,21,opt"` + GroupCurMsgSeq proto.Option[bool] `protobuf:"varint,22,opt"` + GroupLastMsgTime proto.Option[bool] `protobuf:"varint,23,opt"` + GroupQuestion proto.Option[string] `protobuf:"bytes,24,opt"` + GroupAnswer proto.Option[string] `protobuf:"bytes,25,opt"` // optional bool GroupVisitorMaxNum = 26; // optional bool GroupVisitorCurNum = 27; // optional bool LevelNameSeq = 28; diff --git a/client/packets/pb/service/oidb/OidbSvcTrpcTcp0x88D_0.proto b/client/packets/pb/service/oidb/OidbSvcTrpcTcp0x88D_0.proto index 324ed57..ccac2d4 100644 --- a/client/packets/pb/service/oidb/OidbSvcTrpcTcp0x88D_0.proto +++ b/client/packets/pb/service/oidb/OidbSvcTrpcTcp0x88D_0.proto @@ -64,8 +64,8 @@ message D88DGroupInfo { // repeated bool GroupAllianceCode = 19; // optional bool GroupExtraAadmNum = 20; optional bool GroupUin = 21; - // optional bool GroupCurMsgSeq = 22; - // optional bool GroupLastMsgTime = 23; + optional bool GroupCurMsgSeq = 22; + optional bool GroupLastMsgTime = 23; optional string GroupQuestion = 24; optional string GroupAnswer = 25; // optional bool GroupVisitorMaxNum = 26;