add callback and fix cache

This commit is contained in:
wangchuxiao
2022-11-22 14:18:57 +08:00
parent 53d7f60ebc
commit 07cdd8bbab
3 changed files with 19 additions and 10 deletions
-2
View File
@@ -416,8 +416,6 @@ func MemberQuitNotification(req *pbGroup.QuitGroupReq) {
}
groupNotification(constant.MemberQuitNotification, &MemberQuitTips, req.OpUserID, req.GroupID, "", req.OperationID)
// groupNotification(constant.MemberQuitNotification, &MemberQuitTips, req.OpUserID, "", req.OpUserID, req.OperationID)
}
//message ApplicationProcessedTips{
+14 -6
View File
@@ -174,9 +174,13 @@ func (rpc *rpcChat) messageVerification(data *pbChat.SendMsgReq) (bool, int32, s
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
if data.MsgData.ContentType <= constant.NotificationEnd && data.MsgData.ContentType >= constant.NotificationBegin {
return true, 0, "", userIDList
} 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)
if err != nil {
@@ -233,9 +237,13 @@ func (rpc *rpcChat) messageVerification(data *pbChat.SendMsgReq) (bool, int32, s
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
if data.MsgData.ContentType <= constant.NotificationEnd && data.MsgData.ContentType >= constant.NotificationBegin {
return true, 0, "", userIDList
} 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)
if err != nil {