mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
Friend delete handling
This commit is contained in:
parent
6687d1e0c0
commit
f2f36691d1
@ -4,6 +4,7 @@ import (
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"net"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -647,6 +648,22 @@ func decodeOnlinePushReqPacket(c *QQClient, seq uint16, payload []byte) (interfa
|
||||
c.dispatchLeaveGroupEvent(&GroupLeaveEvent{Group: g})
|
||||
}
|
||||
groupLeaveLock.Unlock()
|
||||
case 0x27:
|
||||
s27 := pb.Sub27{}
|
||||
if err := proto.Unmarshal(probuf, &s27); err != nil {
|
||||
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
|
||||
}
|
||||
for _, m := range s27.ModInfos {
|
||||
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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
case 290:
|
||||
t := ¬ify.GeneralGrayTipInfo{}
|
||||
_ = proto.Unmarshal(probuf, t)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -235,6 +235,18 @@ message MessageItem {
|
||||
bytes sig = 7;
|
||||
}
|
||||
|
||||
message Sub27DelFriend {
|
||||
repeated uint64 uins = 1;
|
||||
}
|
||||
|
||||
message Sub27ForwardBody {
|
||||
Sub27DelFriend delFriend = 14;
|
||||
}
|
||||
|
||||
message Sub27 {
|
||||
repeated Sub27ForwardBody modInfos = 1;
|
||||
}
|
||||
|
||||
message SubD4 {
|
||||
int64 uin = 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user