Skip to content

Commit

Permalink
Logging update
Browse files Browse the repository at this point in the history
  • Loading branch information
01101sam committed Apr 10, 2021
1 parent 5ec6c65 commit badbc16
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/c2c_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (c *QQClient) commMsgProcessor(pMsg *msg.Message, info *incomingPacketInfo)
if decoder, ok := c2cDecoders[pMsg.Head.GetMsgType()]; ok {
decoder(c, pMsg, info)
} else {
c.Debug("unknown msg type on c2c processor: %v", pMsg.Head.GetMsgType())
c.Debug("unknown msg type on c2c processor: %v - %v", pMsg.Head.GetMsgType(), pMsg.Head.GetC2CCmd())
}
}

Expand Down
9 changes: 8 additions & 1 deletion client/group_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,14 @@ func decodeMsgSendResponse(c *QQClient, _ *incomingPacketInfo, payload []byte) (
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
}
if rsp.GetResult() != 0 {
c.Error("send msg error: %v %v", rsp.GetResult(), rsp.GetErrMsg())
switch rsp.GetResult() {
case 55:
c.Error("send msg error: %v Bot has blocked target's content", rsp.GetResult())
break
default:
c.Error("send msg error: %v %v", rsp.GetResult(), rsp.GetErrMsg())
break
}
}
return nil, nil
}
Expand Down

0 comments on commit badbc16

Please sign in to comment.