1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-06-19 05:55:05 +08:00

fix private recall decode.

This commit is contained in:
Mrs4s 2020-12-10 01:59:13 +08:00
parent b87fc53213
commit 993d8cf8fa

View File

@ -95,12 +95,12 @@ func decodeMsgWithDrawResponse(_ *QQClient, _ uint16, payload []byte) (interface
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if len(rsp.C2CWithDraw) > 0 {
if rsp.C2CWithDraw[0].GetResult() != 0 {
if rsp.C2CWithDraw[0].GetErrMsg() != "" {
return nil, errors.Errorf("recall error: %v msg: %v", rsp.C2CWithDraw[0].GetResult(), rsp.C2CWithDraw[0].GetErrMsg())
}
}
if len(rsp.GroupWithDraw) > 0 {
if rsp.GroupWithDraw[0].GetResult() != 0 {
if rsp.GroupWithDraw[0].GetErrMsg() != "" {
return nil, errors.Errorf("recall error: %v msg: %v", rsp.GroupWithDraw[0].GetResult(), rsp.GroupWithDraw[0].GetErrMsg())
}
}