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
c9ea0ae6c1
commit
cc6540ec98
@ -38,9 +38,6 @@ func GZipCompress(data []byte) []byte {
|
||||
}
|
||||
|
||||
func GZipUncompress(src []byte) []byte {
|
||||
if src == nil {
|
||||
return nil
|
||||
}
|
||||
b := bytes.NewReader(src)
|
||||
var out bytes.Buffer
|
||||
r, _ := gzip.NewReader(b)
|
||||
|
@ -119,10 +119,11 @@ func decodeMultiApplyDownResponse(_ *QQClient, _ *incomingPacketInfo, payload []
|
||||
if err = proto.Unmarshal(data, &lb); err != nil {
|
||||
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
|
||||
}
|
||||
uc := binary.GZipUncompress(lb.MsgDownRsp[0].MsgContent)
|
||||
if uc == nil {
|
||||
return nil, errors.New("failed to decompress gzip data")
|
||||
msgContent := lb.MsgDownRsp[0].MsgContent
|
||||
if msgContent == nil {
|
||||
return nil, errors.New("message content is empty")
|
||||
}
|
||||
uc := binary.GZipUncompress(msgContent)
|
||||
mt := msg.PbMultiMsgTransmit{}
|
||||
if err = proto.Unmarshal(uc, &mt); err != nil {
|
||||
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
|
||||
|
Loading…
x
Reference in New Issue
Block a user