From 8a8fce927e9d91fb64727beca2bf0c8bd3aa31e2 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Fri, 15 Jul 2022 16:39:09 +0800 Subject: [PATCH] Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release # Conflicts: # pkg/common/db/mysql_model/im_mysql_model/group_model.go --- internal/rpc/group/group.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 39be21a4e..510cb589c 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -442,6 +442,13 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } + for _, userID := range okUserIDList { + err = rocksCache.DelJoinedGroupIDListFromCache(userID) + if err != nil { + log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), userID) + } + } + if groupInfo.GroupType != constant.SuperGroup { if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil { log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID) @@ -667,6 +674,13 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } + for _, userID := range okUserIDList { + err = rocksCache.DelJoinedGroupIDListFromCache(userID) + if err != nil { + log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), userID) + } + } + if groupInfo.GroupType != constant.SuperGroup { if err := rocksCache.DelAllGroupMembersInfoFromCache(req.GroupID); err != nil { log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID) @@ -956,6 +970,13 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) log.NewError(req.OperationID, "DelGroupMemberIDListFromCache rpc logic call failed ", cacheResp.String()) return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } + //for _, userID := range okUserIDList { + // err = rocksCache.DelJoinedGroupIDListFromCache(userID) + // if err != nil { + // log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), userID) + // } + //} + chat.MemberEnterDirectlyNotification(req.GroupID, req.OpUserID, req.OperationID) log.NewInfo(req.OperationID, "JoinGroup rpc return ") return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil