FetchGroupInfo 获取群信息 isStrange是否陌生群聊
(groupUin uint32, isStrange bool)
| 604 | |
| 605 | // FetchGroupInfo 获取群信息 isStrange是否陌生群聊 |
| 606 | func (c *QQClient) FetchGroupInfo(groupUin uint32, isStrange bool) (*entity.Group, error) { |
| 607 | pkt, err := oidb2.BuildFetchGroupReq(groupUin, isStrange) |
| 608 | if err != nil { |
| 609 | return nil, err |
| 610 | } |
| 611 | resp, err := c.sendOidbPacketAndWait(pkt) |
| 612 | if err != nil { |
| 613 | return nil, err |
| 614 | } |
| 615 | groupResp, err := oidb2.ParseFetchGroupResp(resp) |
| 616 | if err != nil { |
| 617 | return nil, err |
| 618 | } |
| 619 | return &entity.Group{ |
| 620 | GroupUin: groupResp.GroupUin, |
| 621 | GroupName: groupResp.GroupName, |
| 622 | GroupOwner: c.GetUin(groupResp.GroupOwner, groupUin), |
| 623 | GroupCreateTime: groupResp.GroupCreateTime, |
| 624 | GroupMemo: groupResp.GroupMemo, |
| 625 | GroupLevel: groupResp.GroupLevel, |
| 626 | MemberCount: groupResp.GroupMemberNum, |
| 627 | MaxMember: groupResp.GroupMemberMaxNum, |
| 628 | LastMsgSeq: groupResp.GroupCurMsgSeq, |
| 629 | }, nil |
| 630 | } |
| 631 | |
| 632 | // GetGroupSystemMessages 获取加群请求信息 |
| 633 | func (c *QQClient) GetGroupSystemMessages(isFiltered bool, count uint32, groupUin ...uint32) (*entity.GroupSystemMessages, error) { |
no test coverage detected