Skip to content

Commit

Permalink
feat: 增加群聊msgseq
Browse files Browse the repository at this point in the history
  • Loading branch information
Redmomn committed Nov 28, 2024
1 parent 251a289 commit a0f44ef
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions client/entity/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ type (
GroupLevel uint32
MemberCount uint32
MaxMember uint32
LastMsgSeq uint32
}

UserJoinGroupRequest struct {
Expand Down
3 changes: 2 additions & 1 deletion client/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}

Expand Down
2 changes: 2 additions & 0 deletions client/packets/oidb/fetch_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
10 changes: 5 additions & 5 deletions client/packets/pb/service/oidb/OidbSvcTrpcTcp0x88D_0.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions client/packets/pb/service/oidb/OidbSvcTrpcTcp0x88D_0.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a0f44ef

Please sign in to comment.