|
|
@ -174,9 +174,13 @@ func (rpc *rpcChat) messageVerification(data *pbChat.SendMsgReq) (bool, int32, s
|
|
|
|
if token_verify.IsManagerUserID(data.MsgData.SendID) {
|
|
|
|
if token_verify.IsManagerUserID(data.MsgData.SendID) {
|
|
|
|
return true, 0, "", userIDList
|
|
|
|
return true, 0, "", userIDList
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if !utils.IsContain(data.MsgData.SendID, userIDList) {
|
|
|
|
if data.MsgData.ContentType <= constant.NotificationEnd && data.MsgData.ContentType >= constant.NotificationBegin {
|
|
|
|
//return returnMsg(&replay, pb, 202, "you are not in group", "", 0)
|
|
|
|
return true, 0, "", userIDList
|
|
|
|
return false, 202, "you are not in group", nil
|
|
|
|
} else {
|
|
|
|
|
|
|
|
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)
|
|
|
|
isMute, err := userIsMuteInGroup(data.MsgData.GroupID, data.MsgData.SendID)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -233,9 +237,13 @@ func (rpc *rpcChat) messageVerification(data *pbChat.SendMsgReq) (bool, int32, s
|
|
|
|
if token_verify.IsManagerUserID(data.MsgData.SendID) {
|
|
|
|
if token_verify.IsManagerUserID(data.MsgData.SendID) {
|
|
|
|
return true, 0, "", userIDList
|
|
|
|
return true, 0, "", userIDList
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if !utils.IsContain(data.MsgData.SendID, userIDList) {
|
|
|
|
if data.MsgData.ContentType <= constant.NotificationEnd && data.MsgData.ContentType >= constant.NotificationBegin {
|
|
|
|
//return returnMsg(&replay, pb, 202, "you are not in group", "", 0)
|
|
|
|
return true, 0, "", userIDList
|
|
|
|
return false, 202, "you are not in group", nil
|
|
|
|
} else {
|
|
|
|
|
|
|
|
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)
|
|
|
|
isMute, err := userIsMuteInGroup(data.MsgData.GroupID, data.MsgData.SendID)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|