del conversation bug fix

pull/261/head
Gordon 2 years ago
parent ba5edabb2c
commit 37799ca0be

@ -70,14 +70,14 @@ func isMessageHasReadEnabled(pb *pbChat.SendMsgReq) (bool, int32, string) {
}
func messageVerification(data *pbChat.SendMsgReq) (bool, int32, string, []string) {
switch data.MsgData.SessionType {
case constant.SingleChatType:
if utils.IsContain(data.MsgData.SendID, config.Config.Manager.AppManagerUid) {
return true, 0, "", nil
}
if data.MsgData.ContentType <= constant.NotificationEnd && data.MsgData.ContentType >= constant.NotificationBegin {
return true, 0, "", nil
}
switch data.MsgData.SessionType {
case constant.SingleChatType:
log.NewDebug(data.OperationID, config.Config.MessageVerify.FriendVerify)
reqGetBlackIDListFromCache := &cacheRpc.GetBlackIDListFromCacheReq{UserID: data.MsgData.RecvID, OperationID: data.OperationID}
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, data.OperationID)
@ -157,6 +157,9 @@ func messageVerification(data *pbChat.SendMsgReq) (bool, int32, string, []string
return false, cacheResp.CommonResp.ErrCode, cacheResp.CommonResp.ErrMsg, nil
}
if !token_verify.IsManagerUserID(data.MsgData.SendID) {
if data.MsgData.ContentType <= constant.NotificationEnd && data.MsgData.ContentType >= constant.NotificationBegin {
return true, 0, "", cacheResp.UserIDList
}
if !utils.IsContain(data.MsgData.SendID, cacheResp.UserIDList) {
//return returnMsg(&replay, pb, 202, "you are not in group", "", 0)
return false, 202, "you are not in group", nil

Loading…
Cancel
Save