mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
refresh skey before getCSRFToken
This commit is contained in:
parent
ddf3476b30
commit
4e350e6b2a
@ -545,7 +545,7 @@ func (c *QQClient) GetFriendList() (*FriendListResponse, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list := rsp.(FriendListResponse)
|
||||
list := rsp.(*FriendListResponse)
|
||||
r.TotalCount = list.TotalCount
|
||||
r.List = append(r.List, list.List...)
|
||||
curFriendCount += len(list.List)
|
||||
@ -736,9 +736,8 @@ func (c *QQClient) FindGroupByUin(uin int64) *GroupInfo {
|
||||
|
||||
func (c *QQClient) FindGroup(code int64) *GroupInfo {
|
||||
for _, g := range c.GroupList {
|
||||
f := g
|
||||
if f.Code == code {
|
||||
return f
|
||||
if g.Code == code {
|
||||
return g
|
||||
}
|
||||
}
|
||||
return nil
|
||||
@ -795,7 +794,7 @@ func (c *QQClient) getCookiesWithDomain(domain string) string {
|
||||
|
||||
func (c *QQClient) getCSRFToken() int {
|
||||
accu := 5381
|
||||
for _, b := range c.sigInfo.sKey {
|
||||
for _, b := range []byte(c.getSKey()) {
|
||||
accu = accu + (accu << 5) + int(b)
|
||||
}
|
||||
return 2147483647 & accu
|
||||
|
@ -475,7 +475,7 @@ func decodeFriendGroupListResponse(_ *QQClient, _ *incomingPacketInfo, payload [
|
||||
FaceId: f.FaceId,
|
||||
})
|
||||
}
|
||||
rsp := FriendListResponse{
|
||||
rsp := &FriendListResponse{
|
||||
TotalCount: int32(totalFriendCount),
|
||||
List: l,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user