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

fix image ocr error.

This commit is contained in:
Mrs4s 2021-07-18 22:54:18 +08:00
parent 11130fd5bb
commit bf6cfc84c5
No known key found for this signature in database
GPG Key ID: 3186E98FA19CE3A7

View File

@ -302,6 +302,9 @@ func decodeImageOcrResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte)
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if rsp.Wording != "" {
if strings.Contains(rsp.Wording, "服务忙") {
return nil, errors.New("未识别到文本")
}
return nil, errors.New(rsp.Wording)
}
if rsp.RetCode != 0 {