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