mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-05 03:23:50 +08:00
try to fix group list limit.
This commit is contained in:
parent
808a63a78e
commit
37409b1f6b
@ -252,12 +252,12 @@ func (c *QQClient) buildFriendGroupListRequestPacket(friendStartIndex, friendLis
|
|||||||
}
|
}
|
||||||
|
|
||||||
// friendlist.GetTroopListReqV2
|
// friendlist.GetTroopListReqV2
|
||||||
func (c *QQClient) buildGroupListRequestPacket() (uint16, []byte) {
|
func (c *QQClient) buildGroupListRequestPacket(vecCookie []byte) (uint16, []byte) {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
req := &jce.TroopListRequest{
|
req := &jce.TroopListRequest{
|
||||||
Uin: c.Uin,
|
Uin: c.Uin,
|
||||||
GetMSFMsgFlag: 1,
|
GetMSFMsgFlag: 1,
|
||||||
Cookies: []byte{},
|
Cookies: vecCookie,
|
||||||
GroupInfo: []int64{},
|
GroupInfo: []int64{},
|
||||||
GroupFlagExt: 1,
|
GroupFlagExt: 1,
|
||||||
Version: 7,
|
Version: 7,
|
||||||
|
@ -653,7 +653,7 @@ func (c *QQClient) ReloadGroupList() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *QQClient) GetGroupList() ([]*GroupInfo, error) {
|
func (c *QQClient) GetGroupList() ([]*GroupInfo, error) {
|
||||||
rsp, err := c.sendAndWait(c.buildGroupListRequestPacket())
|
rsp, err := c.sendAndWait(c.buildGroupListRequestPacket(EmptyBytes))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -333,7 +333,9 @@ func decodeGroupListResponse(c *QQClient, _ uint16, payload []byte) (interface{}
|
|||||||
data := &jce.RequestDataVersion3{}
|
data := &jce.RequestDataVersion3{}
|
||||||
data.ReadFrom(jce.NewJceReader(request.SBuffer))
|
data.ReadFrom(jce.NewJceReader(request.SBuffer))
|
||||||
r := jce.NewJceReader(data.Map["GetTroopListRespV2"][1:])
|
r := jce.NewJceReader(data.Map["GetTroopListRespV2"][1:])
|
||||||
|
vecCookie := []byte{}
|
||||||
groups := []jce.TroopNumber{}
|
groups := []jce.TroopNumber{}
|
||||||
|
r.ReadSlice(&vecCookie, 4)
|
||||||
r.ReadSlice(&groups, 5)
|
r.ReadSlice(&groups, 5)
|
||||||
var l []*GroupInfo
|
var l []*GroupInfo
|
||||||
for _, g := range groups {
|
for _, g := range groups {
|
||||||
@ -348,6 +350,13 @@ func decodeGroupListResponse(c *QQClient, _ uint16, payload []byte) (interface{}
|
|||||||
client: c,
|
client: c,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if len(vecCookie) > 0 {
|
||||||
|
rsp, err := c.sendAndWait(c.buildGroupListRequestPacket(vecCookie))
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
l = append(l, rsp.([]*GroupInfo)...)
|
||||||
|
}
|
||||||
return l, nil
|
return l, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user