add friend and blacklist judge

This commit is contained in:
Gordon 2022-03-16 11:18:59 +08:00
parent 5f37414fee
commit 10884b8175

View File

@ -130,10 +130,10 @@ func (rpc *rpcChat) encapsulateMsgData(msg *sdk_ws.MsgData) {
func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.SendMsgResp, error) { func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.SendMsgResp, error) {
replay := pbChat.SendMsgResp{} replay := pbChat.SendMsgResp{}
log.NewDebug(pb.OperationID, "rpc sendMsg come here", pb.String()) log.NewDebug(pb.OperationID, "rpc sendMsg come here", pb.String())
flag, errCode, errMsg := userRelationshipVerification(pb) //flag, errCode, errMsg := userRelationshipVerification(pb)
if !flag { //if !flag {
return returnMsg(&replay, pb, errCode, errMsg, "", 0) // return returnMsg(&replay, pb, errCode, errMsg, "", 0)
} //}
//if !utils.VerifyToken(pb.Token, pb.SendID) { //if !utils.VerifyToken(pb.Token, pb.SendID) {
// return returnMsg(&replay, pb, http.StatusUnauthorized, "token validate err,not authorized", "", 0) // return returnMsg(&replay, pb, http.StatusUnauthorized, "token validate err,not authorized", "", 0)
rpc.encapsulateMsgData(pb.MsgData) rpc.encapsulateMsgData(pb.MsgData)