1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 11:07:40 +08:00

fix history message.

This commit is contained in:
Mrs4s 2021-03-03 00:37:21 +08:00
parent 2fa091b377
commit 39a33e4c49
3 changed files with 2 additions and 4 deletions

View File

@ -313,6 +313,7 @@ func (c *QQClient) init() {
go c.doHeartbeat()
}
_ = c.RefreshStatus()
_, _ = c.sendAndWait(c.buildGetMessageRequestPacket(msg.SyncFlag_START, time.Now().Unix()))
_, _ = c.SyncSessions()
c.stat.once.Do(func() {
c.OnGroupMessage(func(_ *QQClient, _ *message.GroupMessage) {

View File

@ -10,8 +10,6 @@ import (
"sync"
"time"
log "github.com/sirupsen/logrus"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/binary/jce"
"github.com/Mrs4s/MiraiGo/client/pb"
@ -658,7 +656,6 @@ func decodeOnlinePushReqPacket(c *QQClient, seq uint16, payload []byte) (interfa
if m.DelFriend != nil {
frdUin := m.DelFriend.Uins[0]
if frd := c.FindFriend(int64(frdUin)); frd != nil {
log.Infof("好友被删除: %v(%v)", frd.Nickname, frd.Uin)
if err := c.ReloadFriendList(); err != nil {
return nil, errors.Wrap(err, "failed to reload friend list")
}

View File

@ -101,7 +101,7 @@ func (c *QQClient) SyncSessions() (*SessionSyncResponse, error) {
select {
case <-notifyChan:
stop()
case <-time.After(time.Second * 5):
case <-time.After(time.Second * 20):
stop()
}
return ret, nil