mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
fix bug
This commit is contained in:
parent
b32463df53
commit
d99b0893df
@ -4,6 +4,7 @@ import (
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/db"
|
||||
rocksCache "Open_IM/pkg/common/db/rocks_cache"
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/common/token_verify"
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
@ -128,6 +129,13 @@ func messageVerification(data *pbChat.SendMsgReq) (bool, int32, string, []string
|
||||
case constant.GroupChatType:
|
||||
fallthrough
|
||||
case constant.SuperGroupChatType:
|
||||
groupInfo, err := rocksCache.GetGroupInfoFromCache(data.MsgData.GroupID)
|
||||
if err != nil {
|
||||
return false, 201, err.Error(), nil
|
||||
}
|
||||
if groupInfo.GroupType == constant.SuperGroup {
|
||||
return true, 0, "", nil
|
||||
} else {
|
||||
getGroupMemberIDListFromCacheReq := &pbCache.GetGroupMemberIDListFromCacheReq{OperationID: data.OperationID, GroupID: data.MsgData.GroupID}
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, data.OperationID)
|
||||
if etcdConn == nil {
|
||||
@ -155,7 +163,7 @@ func messageVerification(data *pbChat.SendMsgReq) (bool, int32, string, []string
|
||||
}
|
||||
}
|
||||
return true, 0, "", cacheResp.UserIDList
|
||||
|
||||
}
|
||||
default:
|
||||
return true, 0, "", nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user