mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-12 14:32:23 +08:00
add friend and blacklist judge
This commit is contained in:
parent
5f37414fee
commit
10884b8175
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user