mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
This commit is contained in:
parent
cef9c9ddee
commit
e80b770481
@ -38,6 +38,9 @@ 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)
|
||||
|
@ -120,6 +120,9 @@ func decodeMultiApplyDownResponse(_ *QQClient, _ *incomingPacketInfo, payload []
|
||||
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")
|
||||
}
|
||||
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