mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-24 02:16:16 +08:00
fix bug
This commit is contained in:
parent
7f9812a488
commit
135973de09
@ -171,15 +171,13 @@ func (rpc *rpcChat) messageVerification(data *pbChat.SendMsgReq) (bool, int32, s
|
||||
log.NewError(data.OperationID, errMsg)
|
||||
return false, 201, errMsg, nil
|
||||
}
|
||||
if !token_verify.IsManagerUserID(data.MsgData.SendID) {
|
||||
if data.MsgData.ContentType <= constant.NotificationEnd && data.MsgData.ContentType >= constant.NotificationBegin {
|
||||
if token_verify.IsManagerUserID(data.MsgData.SendID) {
|
||||
return true, 0, "", userIDList
|
||||
}
|
||||
if !utils.IsContain(data.MsgData.SendID, userIDList) {
|
||||
//return returnMsg(&replay, pb, 202, "you are not in group", "", 0)
|
||||
return false, 202, "you are not in group", nil
|
||||
}
|
||||
}
|
||||
isMute, err := userIsMuteInGroup(data.MsgData.GroupID, data.MsgData.SendID)
|
||||
if err != nil {
|
||||
errMsg := data.OperationID + err.Error()
|
||||
@ -232,15 +230,13 @@ func (rpc *rpcChat) messageVerification(data *pbChat.SendMsgReq) (bool, int32, s
|
||||
log.NewError(data.OperationID, errMsg)
|
||||
return false, 201, errMsg, nil
|
||||
}
|
||||
if !token_verify.IsManagerUserID(data.MsgData.SendID) {
|
||||
if data.MsgData.ContentType <= constant.NotificationEnd && data.MsgData.ContentType >= constant.NotificationBegin {
|
||||
if token_verify.IsManagerUserID(data.MsgData.SendID) {
|
||||
return true, 0, "", userIDList
|
||||
}
|
||||
if !utils.IsContain(data.MsgData.SendID, userIDList) {
|
||||
//return returnMsg(&replay, pb, 202, "you are not in group", "", 0)
|
||||
return false, 202, "you are not in group", nil
|
||||
}
|
||||
}
|
||||
isMute, err := userIsMuteInGroup(data.MsgData.GroupID, data.MsgData.SendID)
|
||||
if err != nil {
|
||||
errMsg := data.OperationID + err.Error()
|
||||
|
Loading…
x
Reference in New Issue
Block a user