diff --git a/internal/api_to_rpc/api.go b/internal/api_to_rpc/api.go index 87c09af2d..19c965b86 100644 --- a/internal/api_to_rpc/api.go +++ b/internal/api_to_rpc/api.go @@ -7,7 +7,6 @@ import ( utils2 "Open_IM/pkg/utils" "context" "fmt" - utils "github.com/OpenIMSDK/open_utils" "github.com/gin-gonic/gin" "reflect" ) @@ -31,10 +30,11 @@ func ApiToRpc(c *gin.Context, apiReq, apiResp interface{}, rpcName string, rpcCl reflect.ValueOf(etcdConn), })[0].MethodByName(rpcFuncName) // rpc func rpcReqPtr := reflect.New(rpc.Type().In(1).Elem()) // *req参数 - if err := utils.CopyStructFields(rpcReqPtr.Interface(), apiReq); err != nil { - trace_log.WriteErrorResponse(nCtx, "CopyStructFields_RpcReq", err) - return - } + //if err := utils.CopyStructFields(rpcReqPtr.Interface(), apiReq); err != nil { + // trace_log.WriteErrorResponse(nCtx, "CopyStructFields_RpcReq", err) + // return + //} + CopyAny(apiReq, rpcReqPtr.Interface()) trace_log.SetCtxInfo(nCtx, logFuncName, nil, "opUserID", c.GetString("opUserID"), "callRpcReq", rpcString(rpcReqPtr.Elem().Interface())) respArr := rpc.Call([]reflect.Value{ reflect.ValueOf(context.Context(c)), // context.Context @@ -48,9 +48,10 @@ func ApiToRpc(c *gin.Context, apiReq, apiResp interface{}, rpcName string, rpcCl rpcResp := respArr[0].Elem() trace_log.SetCtxInfo(nCtx, rpcFuncName, nil, "callRpcResp", rpcString(rpcResp.Interface())) if apiResp != nil { - if err := utils.CopyStructFields(apiResp, rpcResp.Interface()); err != nil { - trace_log.SetCtxInfo(nCtx, "CopyStructFields_RpcResp", err, "apiResp", fmt.Sprintf("%T", apiResp), "rpcResp", fmt.Sprintf("%T", rpcResp.Interface())) - } + //if err := utils.CopyStructFields(apiResp, rpcResp.Interface()); err != nil { + // trace_log.SetCtxInfo(nCtx, "CopyStructFields_RpcResp", err, "apiResp", fmt.Sprintf("%T", apiResp), "rpcResp", fmt.Sprintf("%T", rpcResp.Interface())) + //} + CopyAny(rpcResp.Interface(), apiResp) } trace_log.SetSuccess(nCtx, rpcFuncName, apiResp) } diff --git a/internal/api_to_rpc/copy.go b/internal/api_to_rpc/copy.go new file mode 100644 index 000000000..f2a887bb3 --- /dev/null +++ b/internal/api_to_rpc/copy.go @@ -0,0 +1,250 @@ +package common + +import ( + "fmt" + "google.golang.org/protobuf/types/known/wrapperspb" + "reflect" +) + +func setBaseValue(from, to reflect.Value) { + if isBaseNil(from) { + return + } + var l int + t := to.Type() + for t.Kind() == reflect.Ptr { + l++ + t = t.Elem() + } + v := baseValue(from) + for i := 0; i < l; i++ { + t := reflect.New(v.Type()) + t.Elem().Set(v) + v = t + } + to.Set(v) +} + +func CopyAny(from, to interface{}) { + t := reflect.ValueOf(to) + if t.Kind() == reflect.Ptr { + t = t.Elem() + } + if !t.CanSet() { + return + } + f := reflect.ValueOf(from) + if isBaseNil(f) { + return + } + copyAny(f, t) +} + +func copyAny(from, to reflect.Value) { + if !to.CanSet() { + return + } + if isBaseNil(from) { + return + } + if isBaseNil(to) { + to.Set(getBaseZeroValue(to.Type())) + } + btfrom := baseType(from.Type()) + btto := baseType(to.Type()) + if typeEq(btfrom, btto) { + setBaseValue(from, to) + return + } + if _, ok := wrapType[btto.String()]; ok { // string -> wrapperspb.StringValue + val := reflect.New(btto).Elem() + copyAny(from, val.FieldByName("Value")) + setBaseValue(val, to) + return + } + if _, ok := wrapType[btfrom.String()]; ok { // wrapperspb.StringValue -> string + copyAny(baseValue(from).FieldByName("Value"), to) + return + } + if btfrom.Kind() == reflect.Struct && btto.Kind() == reflect.Struct { + copyStruct(baseValue(from), baseValue(to)) + return + } + if btfrom.Kind() == reflect.Slice && btto.Kind() == reflect.Slice { + copySlice(baseValue(from), baseValue(to)) + return + } + if btto.Kind() == reflect.String { + if isBaseNil(to) { + to.Set(getBaseZeroValue(baseType(to.Type()))) + } + setBaseValue(reflect.ValueOf(toString(from)), to) + return + } + if toNumber(from, to) { + return + } +} + +func getBaseZeroValue(t reflect.Type) reflect.Value { + var l int + for t.Kind() == reflect.Ptr { + l++ + t = t.Elem() + } + v := reflect.Zero(t) + for i := 0; i < l; i++ { + t := reflect.New(v.Type()) + t.Elem().Set(v) + v = t + } + return v +} + +func isBaseNil(v reflect.Value) bool { + for { + switch v.Kind() { + case reflect.Ptr: + v = v.Elem() + case reflect.Invalid: + return true + default: + return isNil(v) + } + } +} + +func baseType(t reflect.Type) reflect.Type { + for t.Kind() == reflect.Ptr { + t = t.Elem() + } + return t +} + +func baseLayer(t reflect.Type) int { + var layer int + for t.Kind() == reflect.Ptr { + layer++ + t = t.Elem() + } + return layer +} + +func typeEq(t1, t2 reflect.Type) bool { + return t1.String() == t2.String() +} + +func isNil(value reflect.Value) bool { + switch value.Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Pointer, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return value.IsNil() + } + return false +} + +func baseValue(value reflect.Value) reflect.Value { + for value.Kind() == reflect.Ptr { + value = value.Elem() + } + return value +} + +func copyStruct(from, to reflect.Value) { + toType := to.Type() + fromType := from.Type() + n := to.NumField() + for i := 0; i < n; i++ { + toFieldType := toType.Field(i) + if _, found := fromType.FieldByName(toFieldType.Name); !found { + continue + } + copyAny(from.FieldByName(toFieldType.Name), to.Field(i)) + } +} + +func copySlice(from, to reflect.Value) { + size := from.Len() + temp := reflect.MakeSlice(to.Type(), 0, size) + elemTo := to.Type().Elem() + for i := 0; i < size; i++ { + itemTo := getBaseZeroValue(elemTo) + copyAny(from.Index(i), itemTo) + temp = reflect.Append(temp, itemTo) + } + to.Set(temp) +} + +func toString(value reflect.Value) string { + if value.Kind() == reflect.Slice { + switch value.Type().String() { + case "[]uint8": + return string(value.Interface().([]uint8)) + case "[]int32": + return string(value.Interface().([]int32)) + } + } + return fmt.Sprint(value.Interface()) +} + +func toNumber(from1, to1 reflect.Value) bool { + if isBaseNil(to1) { + to1.Set(getBaseZeroValue(to1.Type())) + } + from := baseValue(from1) + to := baseValue(to1) + switch from.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + switch to.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + to.SetInt(from.Int()) + return true + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + to.SetUint(uint64(from.Int())) + return true + case reflect.Float64, reflect.Float32: + to.SetFloat(float64(from.Int())) + return true + } + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + switch to.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + to.SetInt(int64(from.Uint())) + return true + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + to.SetInt(int64(from.Uint())) + return true + case reflect.Float64, reflect.Float32: + to.SetFloat(float64(from.Uint())) + return true + } + case reflect.Float64, reflect.Float32: + switch to.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + to.SetInt(int64(from.Float())) + return true + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + to.SetUint(uint64(from.Float())) + return true + case reflect.Float64, reflect.Float32: + to.SetFloat(from.Float()) + return true + } + } + return false +} + +func typeName(v interface{}) string { + return reflect.TypeOf(v).String() +} + +var wrapType = map[string]struct{}{ + typeName(wrapperspb.DoubleValue{}): {}, + typeName(wrapperspb.FloatValue{}): {}, + typeName(wrapperspb.Int64Value{}): {}, + typeName(wrapperspb.UInt64Value{}): {}, + typeName(wrapperspb.Int32Value{}): {}, + typeName(wrapperspb.UInt32Value{}): {}, + typeName(wrapperspb.BoolValue{}): {}, + typeName(wrapperspb.StringValue{}): {}, + typeName(wrapperspb.BytesValue{}): {}, +} diff --git a/internal/rpc/friend/callback.go b/internal/rpc/friend/callback.go index 7ff50381d..4204cc0a0 100644 --- a/internal/rpc/friend/callback.go +++ b/internal/rpc/friend/callback.go @@ -12,6 +12,17 @@ import ( http2 "net/http" ) +func callbackBeforeAddFriendV1(req *pbFriend.AddFriendReq) error { + resp := callbackBeforeAddFriend(req) + if resp.ErrCode != 0 { + return (&constant.ErrInfo{ + ErrCode: resp.ErrCode, + ErrMsg: resp.ErrMsg, + }).Wrap() + } + return nil +} + func callbackBeforeAddFriend(req *pbFriend.AddFriendReq) cbApi.CommonCallbackResp { callbackResp := cbApi.CommonCallbackResp{OperationID: req.CommID.OperationID} if !config.Config.Callback.CallbackBeforeAddFriend.Enable { diff --git a/internal/rpc/friend/friend.go b/internal/rpc/friend/friend.go index 7b7fed858..ebe24b7f1 100644 --- a/internal/rpc/friend/friend.go +++ b/internal/rpc/friend/friend.go @@ -7,17 +7,17 @@ import ( imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" rocksCache "Open_IM/pkg/common/db/rocks_cache" "Open_IM/pkg/common/log" + "Open_IM/pkg/common/middleware" promePkg "Open_IM/pkg/common/prometheus" "Open_IM/pkg/common/token_verify" + "Open_IM/pkg/common/tools" cp "Open_IM/pkg/common/utils" + "Open_IM/pkg/getcdv3" pbCache "Open_IM/pkg/proto/cache" pbFriend "Open_IM/pkg/proto/friend" sdkws "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "context" - "errors" - "fmt" - "github.com/OpenIMSDK/getcdv3" "net" "strconv" "strings" @@ -29,19 +29,25 @@ import ( ) type friendServer struct { - rpcPort int - rpcRegisterName string - etcdSchema string - etcdAddr []string + rpcPort int + rpcRegisterName string + etcdSchema string + etcdAddr []string + friendModel *imdb.Friend + friendRequestModel *imdb.FriendRequest + blackModel *imdb.Black } func NewFriendServer(port int) *friendServer { log.NewPrivateLog(constant.LogFileName) return &friendServer{ - rpcPort: port, - rpcRegisterName: config.Config.RpcRegisterName.OpenImFriendName, - etcdSchema: config.Config.Etcd.EtcdSchema, - etcdAddr: config.Config.Etcd.EtcdAddr, + rpcPort: port, + rpcRegisterName: config.Config.RpcRegisterName.OpenImFriendName, + etcdSchema: config.Config.Etcd.EtcdSchema, + etcdAddr: config.Config.Etcd.EtcdAddr, + friendModel: imdb.NewFriend(nil), + friendRequestModel: imdb.NewFriendRequest(nil), + blackModel: imdb.NewBlack(nil), } } @@ -65,6 +71,7 @@ func (s *friendServer) Run() { defer listener.Close() //grpc server var grpcOpts []grpc.ServerOption + grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(middleware.RpcServerInterceptor)) if config.Config.Prometheus.Enable { promePkg.NewGrpcRequestCounter() promePkg.NewGrpcRequestFailedCounter() @@ -100,67 +107,43 @@ func (s *friendServer) Run() { } func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlacklistReq) (*pbFriend.AddBlacklistResp, error) { - log.NewInfo(req.CommID.OperationID, "AddBlacklist args ", req.String()) - ok := token_verify.CheckAccess(ctx, req.CommID.OpUserID, req.CommID.FromUserID) - if !ok { - return &pbFriend.AddBlacklistResp{CommonResp: constant.Error2CommResp(ctx, constant.ErrNoPermission, "accress")}, nil + resp := &pbFriend.AddBlacklistResp{} + if err := token_verify.CheckAccessV3(ctx, req.CommID.FromUserID); err != nil { + return nil, err } black := imdb.Black{OwnerUserID: req.CommID.FromUserID, BlockUserID: req.CommID.ToUserID, OperatorUserID: req.CommID.OpUserID} - err := imdb.InsertInToUserBlackList(ctx, black) + if err := s.blackModel.Create(ctx, []*imdb.Black{&black}); err != nil { + return nil, err + } + etcdConn, err := getcdv3.GetConn(ctx, config.Config.RpcRegisterName.OpenImCacheName) if err != nil { - return &pbFriend.AddBlacklistResp{CommonResp: constant.Error2CommResp(ctx, constant.ErrDatabase, err.Error())}, nil + return nil, err } - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.CommID.OperationID, config.Config.Etcd.UserName, config.Config.Etcd.Password) - if etcdConn == nil { - return &pbFriend.AddBlacklistResp{CommonResp: constant.Error2CommResp(ctx, constant.ErrInternalServer, "conn is nil")}, nil - } - cacheClient := pbCache.NewCacheClient(etcdConn) - cacheResp, err := cacheClient.DelBlackIDListFromCache(ctx, &pbCache.DelBlackIDListFromCacheReq{UserID: req.CommID.FromUserID, OperationID: req.CommID.OperationID}) + _, err = pbCache.NewCacheClient(etcdConn).DelBlackIDListFromCache(ctx, &pbCache.DelBlackIDListFromCacheReq{UserID: req.CommID.FromUserID, OperationID: req.CommID.OperationID}) if err != nil { - return &pbFriend.AddBlacklistResp{CommonResp: constant.Error2CommResp(ctx, constant.ErrInternalServer, err.Error())}, nil - } - if cacheResp.CommonResp.ErrCode != 0 { - err = errors.New(fmt.Sprintf("call DelBlackIDListFromCache rpc failed code is %d, err is %s, args is %s", cacheResp.CommonResp.ErrCode, cacheResp.CommonResp.ErrMsg, req.CommID.FromUserID)) - return &pbFriend.AddBlacklistResp{CommonResp: constant.Error2CommResp(ctx, constant.ErrInternalServer, err.Error())}, nil + return nil, err } chat.BlackAddedNotification(req) - return &pbFriend.AddBlacklistResp{CommonResp: constant.Error2CommResp(ctx, constant.ErrNone, "")}, nil + return resp, nil } func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq) (*pbFriend.AddFriendResp, error) { - log.NewInfo(req.CommID.OperationID, "AddFriend args ", req.String()) - ok := token_verify.CheckAccess(ctx, req.CommID.OpUserID, req.CommID.FromUserID) - if !ok { - log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.AddFriendResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrNoPermission.ErrCode, ErrMsg: constant.ErrNoPermission.ErrMsg}}, nil + resp := &pbFriend.AddFriendResp{} + if err := token_verify.CheckAccessV3(ctx, req.CommID.FromUserID); err != nil { + return nil, err } - - callbackResp := callbackBeforeAddFriend(req) - if callbackResp.ErrCode != 0 { - log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), "callbackBeforeSendSingleMsg resp: ", callbackResp) + if err := callbackBeforeAddFriendV1(req); err != nil { + return nil, err } - if callbackResp.ActionCode != constant.ActionAllow { - if callbackResp.ErrCode == 0 { - callbackResp.ErrCode = 201 - } - log.NewDebug(req.CommID.OperationID, utils.GetSelfFuncName(), "callbackBeforeSendSingleMsg result", "end rpc and return", callbackResp) - return &pbFriend.AddFriendResp{CommonResp: &sdkws.CommonResp{ - ErrCode: int32(callbackResp.ErrCode), - ErrMsg: callbackResp.ErrMsg, - }}, nil - } - var isSend = true userIDList, err := rocksCache.GetFriendIDListFromCache(ctx, req.CommID.ToUserID) if err != nil { - log.NewError(req.CommID.OperationID, "GetFriendIDListFromCache failed ", err.Error(), req.CommID.ToUserID) - return &pbFriend.AddFriendResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: err.Error()}}, nil + return nil, err } userIDList2, err := rocksCache.GetFriendIDListFromCache(ctx, req.CommID.FromUserID) if err != nil { - log.NewError(req.CommID.OperationID, "GetUserByUserID failed ", err.Error(), req.CommID.FromUserID) - return &pbFriend.AddFriendResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: err.Error()}}, nil + return nil, err } - log.NewDebug(req.CommID.OperationID, "toUserID", userIDList, "fromUserID", userIDList2) + var isSend = true for _, v := range userIDList { if v == req.CommID.FromUserID { for _, v2 := range userIDList2 { @@ -176,85 +159,73 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq //Cannot add non-existent users if isSend { - if _, err := imdb.GetUserByUserID(req.CommID.ToUserID); err != nil { - log.NewError(req.CommID.OperationID, "GetUserByUserID failed ", err.Error(), req.CommID.ToUserID) - return &pbFriend.AddFriendResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + if _, err := GetUserInfo(ctx, req.CommID.ToUserID); err != nil { + return nil, err } friendRequest := imdb.FriendRequest{ - HandleResult: 0, ReqMsg: req.ReqMsg, CreateTime: time.Now()} - utils.CopyStructFields(&friendRequest, req.CommID) - // {openIM001 openIM002 0 test add friend 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }] - log.NewDebug(req.CommID.OperationID, "UpdateFriendApplication args ", friendRequest) - //err := imdb.InsertFriendApplication(&friendRequest) - err := imdb.InsertFriendApplication(&friendRequest, - map[string]interface{}{"handle_result": 0, "req_msg": friendRequest.ReqMsg, "create_time": friendRequest.CreateTime, - "handler_user_id": "", "handle_msg": "", "handle_time": utils.UnixSecondToTime(0), "ex": ""}) - if err != nil { - log.NewError(req.CommID.OperationID, "UpdateFriendApplication failed ", err.Error(), friendRequest) - return &pbFriend.AddFriendResp{CommonResp: &sdkws.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + FromUserID: req.CommID.FromUserID, + ToUserID: req.CommID.ToUserID, + HandleResult: 0, + ReqMsg: req.ReqMsg, + CreateTime: time.Now(), + } + if err := s.friendRequestModel.Create(ctx, []*imdb.FriendRequest{&friendRequest}); err != nil { + return nil, err } - chat.FriendApplicationNotification(req) } - //Establish a latest relationship in the friend request table - - return &pbFriend.AddFriendResp{CommonResp: &sdkws.CommonResp{}}, nil + return resp, nil } func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFriendReq) (*pbFriend.ImportFriendResp, error) { - log.NewInfo(req.OperationID, "ImportFriend args ", req.String()) - resp := pbFriend.ImportFriendResp{CommonResp: &sdkws.CommonResp{}} - var c sdkws.CommonResp - - if !utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { - log.NewError(req.OperationID, "not authorized", req.OpUserID, config.Config.Manager.AppManagerUid) - c.ErrCode = constant.ErrNoPermission.ErrCode - c.ErrMsg = constant.ErrNoPermission.ErrMsg - for _, v := range req.FriendUserIDList { - resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) - } - resp.CommonResp = &c - return &resp, nil + resp := &pbFriend.ImportFriendResp{} + //var c sdkws.CommonResp + if !utils.IsContain(tools.OpUserID(ctx), config.Config.Manager.AppManagerUid) { + //log.NewError(req.OperationID, "not authorized", req.OpUserID, config.Config.Manager.AppManagerUid) + //c.ErrCode = constant.ErrNoPermission.ErrCode + //c.ErrMsg = constant.ErrNoPermission.ErrMsg + //for _, userID := range req.FriendUserIDList { + // resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: userID, Result: -1}) + //} + return nil, constant.ErrNoPermission.Wrap() } - if _, err := imdb.GetUserByUserID(req.FromUserID); err != nil { - log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), req.FromUserID) - c.ErrCode = constant.ErrDB.ErrCode - c.ErrMsg = "this user not exists,cant not add friend" - for _, v := range req.FriendUserIDList { - resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) - } - resp.CommonResp = &c - return &resp, nil + if _, err := GetUserInfo(ctx, req.FromUserID); err != nil { + //log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), req.FromUserID) + //c.ErrCode = constant.ErrDB.ErrCode + //c.ErrMsg = "this user not exists,cant not add friend" + //for _, userID := range req.FriendUserIDList { + // resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: userID, Result: -1}) + //} + //resp.CommonResp = &c + return nil, err } - for _, v := range req.FriendUserIDList { - log.NewDebug(req.OperationID, "FriendUserIDList ", v) - if _, fErr := imdb.GetUserByUserID(v); fErr != nil { - log.NewError(req.OperationID, "GetUserByUserID failed ", fErr.Error(), v) - resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) + for _, userID := range req.FriendUserIDList { + if _, fErr := GetUserInfo(ctx, userID); fErr != nil { + resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: userID, Result: -1}) } else { - if _, err := imdb.GetFriendRelationshipFromFriend(req.FromUserID, v); err != nil { + if _, err := imdb.GetFriendRelationshipFromFriend(req.FromUserID, userID); err != nil { //Establish two single friendship - toInsertFollow := imdb.Friend{OwnerUserID: req.FromUserID, FriendUserID: v} + toInsertFollow := imdb.Friend{OwnerUserID: req.FromUserID, FriendUserID: userID} err1 := imdb.InsertToFriend(&toInsertFollow) if err1 != nil { log.NewError(req.OperationID, "InsertToFriend failed ", err1.Error(), toInsertFollow) - resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) + resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: userID, Result: -1}) continue } - toInsertFollow = imdb.Friend{OwnerUserID: v, FriendUserID: req.FromUserID} + toInsertFollow = imdb.Friend{OwnerUserID: userID, FriendUserID: req.FromUserID} err2 := imdb.InsertToFriend(&toInsertFollow) if err2 != nil { log.NewError(req.OperationID, "InsertToFriend failed ", err2.Error(), toInsertFollow) - resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) + resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: userID, Result: -1}) continue } - resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: 0}) + resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: userID, Result: 0}) log.NewDebug(req.OperationID, "UserIDResultList ", resp.UserIDResultList) - chat.FriendAddedNotification(req.OperationID, req.OpUserID, req.FromUserID, v) + chat.FriendAddedNotification(req.OperationID, req.OpUserID, req.FromUserID, userID) } else { - log.NewWarn(req.OperationID, "GetFriendRelationshipFromFriend ok", req.FromUserID, v) - resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: 0}) + log.NewWarn(req.OperationID, "GetFriendRelationshipFromFriend ok", req.FromUserID, userID) + resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: userID, Result: 0}) } } } diff --git a/internal/rpc/friend/other.go b/internal/rpc/friend/other.go new file mode 100644 index 000000000..592f9eada --- /dev/null +++ b/internal/rpc/friend/other.go @@ -0,0 +1,10 @@ +package friend + +import ( + "context" + "errors" +) + +func GetUserInfo(ctx context.Context, userID string) (interface{}, error) { + return nil, errors.New("TODO:GetUserInfo") +} diff --git a/internal/rpc/group/g.go b/internal/rpc/group/g.go new file mode 100644 index 000000000..4c6699584 --- /dev/null +++ b/internal/rpc/group/g.go @@ -0,0 +1,42 @@ +package group + +import ( + "Open_IM/pkg/common/constant" + imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + "Open_IM/pkg/common/tools" + pbGroup "Open_IM/pkg/proto/group" + "Open_IM/pkg/utils" + "context" + "time" +) + +func getDBGroupRequest(ctx context.Context, req *pbGroup.GroupApplicationResponseReq) (dbGroupRequest *imdb.GroupRequest) { + dbGroupRequest = &imdb.GroupRequest{} + utils.CopyStructFields(&dbGroupRequest, req) + dbGroupRequest.UserID = req.FromUserID + dbGroupRequest.HandleUserID = tools.OpUserID(ctx) + dbGroupRequest.HandledTime = time.Now() + return dbGroupRequest +} + +func getDBGroupMember(ctx context.Context, req *pbGroup.GroupApplicationResponseReq) (dbGroupMember *imdb.GroupMember) { + dbGroupMember = &imdb.GroupMember{} + utils.CopyStructFields(&dbGroupRequest, req) + dbGroupRequest.UserID = req.FromUserID + dbGroupRequest.HandleUserID = tools.OpUserID(ctx) + dbGroupRequest.HandledTime = time.Now() + + member := imdb.GroupMember{} + member.GroupID = req.GroupID + member.UserID = req.FromUserID + member.RoleLevel = constant.GroupOrdinaryUsers + member.OperatorUserID = tools.OpUserID(ctx) + + member.FaceURL = user.FaceURL + member.Nickname = user.Nickname + member.JoinSource = request.JoinSource + member.InviterUserID = request.InviterUserID + member.MuteEndTime = time.Unix(int64(time.Now().Second()), 0) + + return dbGroupRequest +} diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 9ef0b1667..93698225d 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -134,17 +134,17 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR userIDs = append(userIDs, req.OwnerUserID) } if groupOwnerNum != 1 { - return nil, utils.Wrap(constant.ErrArgs, "") + return nil, constant.ErrArgs.Wrap("groupOwnerNum != 1") } if utils.IsRepeatStringSlice(userIDs) { - return nil, utils.Wrap(constant.ErrArgs, "") + return nil, constant.ErrArgs.Wrap("group member is repeated") } users, err := rocksCache.GetUserInfoFromCacheBatch(ctx, userIDs) if err != nil { return nil, err } if len(users) != len(userIDs) { - return nil, utils.Wrap(constant.ErrArgs, "") + return nil, constant.ErrDatabase.Wrap("len(users from cache) != len(userIDs)") } userMap := make(map[string]*imdb.User) for i, user := range users { @@ -158,14 +158,14 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } groupId := req.GroupInfo.GroupID if groupId == "" { - groupId = utils.Md5(req.OperationID + strconv.FormatInt(time.Now().UnixNano(), 10)) + groupId = utils.Md5(tools.OperationID(ctx) + strconv.FormatInt(time.Now().UnixNano(), 10)) bi := big.NewInt(0) bi.SetString(groupId[0:8], 16) groupId = bi.String() } groupInfo := imdb.Group{} utils.CopyStructFields(&groupInfo, req.GroupInfo) - groupInfo.CreatorUserID = req.OpUserID + groupInfo.CreatorUserID = tools.OpUserID(ctx) groupInfo.GroupID = groupId groupInfo.CreateTime = time.Now() if groupInfo.NotificationUpdateTime.Unix() < 0 { @@ -174,10 +174,10 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR if req.GroupInfo.GroupType != constant.SuperGroup { var groupMembers []*imdb.GroupMember joinGroup := func(userID string, roleLevel int32) error { - groupMember := &imdb.GroupMember{GroupID: groupId, RoleLevel: roleLevel, OperatorUserID: req.OpUserID, JoinSource: constant.JoinByInvitation, InviterUserID: req.OpUserID} + groupMember := &imdb.GroupMember{GroupID: groupId, RoleLevel: roleLevel, OperatorUserID: tools.OpUserID(ctx), JoinSource: constant.JoinByInvitation, InviterUserID: tools.OpUserID(ctx)} user := userMap[userID] utils.CopyStructFields(&groupMember, user) - if err := CallbackBeforeMemberJoinGroup(ctx, req.OperationID, groupMember, groupInfo.Ex); err != nil { + if err := CallbackBeforeMemberJoinGroup(ctx, tools.OperationID(ctx), groupMember, groupInfo.Ex); err != nil { return err } groupMembers = append(groupMembers, groupMember) @@ -207,7 +207,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR utils.CopyStructFields(resp.GroupInfo, groupInfo) resp.GroupInfo.MemberCount = uint32(len(userIDs)) if req.GroupInfo.GroupType != constant.SuperGroup { - chat.GroupCreatedNotification(req.OperationID, req.OpUserID, groupId, userIDs) + chat.GroupCreatedNotification(tools.OperationID(ctx), tools.OpUserID(ctx), groupId, userIDs) } else { for _, userID := range userIDs { if err := rocksCache.DelJoinedSuperGroupIDListFromCache(ctx, userID); err != nil { @@ -216,7 +216,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } go func() { for _, v := range userIDs { - chat.SuperGroupNotification(req.OperationID, v, v) + chat.SuperGroupNotification(tools.OperationID(ctx), v, v) } }() } @@ -237,7 +237,7 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo var groupNode open_im_sdk.GroupInfo num, err := rocksCache.GetGroupMemberNumFromCache(ctx, groupID) if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), groupID) + log.NewError(tools.OperationID(ctx), utils.GetSelfFuncName(), err.Error(), groupID) continue } owner, err := (*imdb.GroupMember)(nil).TakeOwnerInfo(ctx, groupID) @@ -285,14 +285,14 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite return nil, utils.Wrap(constant.ErrDismissedAlready, "") } if groupInfo.NeedVerification == constant.AllNeedVerification && - !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) && !token_verify.IsManagerUserID(req.OpUserID) { + !imdb.IsGroupOwnerAdmin(req.GroupID, tools.OpUserID(ctx)) && !token_verify.IsManagerUserID(tools.OpUserID(ctx)) { joinReq := pbGroup.JoinGroupReq{} for _, v := range req.InvitedUserIDList { var groupRequest imdb.GroupRequest groupRequest.UserID = v groupRequest.GroupID = req.GroupID groupRequest.JoinSource = constant.JoinByInvitation - groupRequest.InviterUserID = req.OpUserID + groupRequest.InviterUserID = tools.OpUserID(ctx) err = imdb.InsertIntoGroupRequest(groupRequest) if err != nil { var resultNode pbGroup.Id2Result @@ -306,10 +306,8 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite resultNode.UserID = v resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) joinReq.GroupID = req.GroupID - joinReq.OperationID = req.OperationID - joinReq.OpUserID = v resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) - chat.JoinGroupApplicationNotification(&joinReq) + chat.JoinGroupApplicationNotification(ctx, &joinReq) } } return resp, nil @@ -343,10 +341,10 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite utils.CopyStructFields(&toInsertInfo, toUserInfo) toInsertInfo.GroupID = req.GroupID toInsertInfo.RoleLevel = constant.GroupOrdinaryUsers - toInsertInfo.OperatorUserID = req.OpUserID - toInsertInfo.InviterUserID = req.OpUserID + toInsertInfo.OperatorUserID = tools.OpUserID(ctx) + toInsertInfo.InviterUserID = tools.OpUserID(ctx) toInsertInfo.JoinSource = constant.JoinByInvitation - if err := CallbackBeforeMemberJoinGroup(ctx, req.OperationID, &toInsertInfo, groupInfo.Ex); err != nil { + if err := CallbackBeforeMemberJoinGroup(ctx, tools.OperationID(ctx), &toInsertInfo, groupInfo.Ex); err != nil { return nil, err } err = imdb.InsertIntoGroupMember(toInsertInfo) @@ -371,7 +369,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite } if groupInfo.GroupType != constant.SuperGroup { - chat.MemberInvitedNotification(req.OperationID, req.GroupID, req.OpUserID, req.Reason, okUserIDList) + chat.MemberInvitedNotification(tools.OperationID(ctx), req.GroupID, tools.OpUserID(ctx), req.Reason, okUserIDList) } else { for _, userID := range req.InvitedUserIDList { if err := rocksCache.DelJoinedSuperGroupIDListFromCache(ctx, userID); err != nil { @@ -379,7 +377,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite } } for _, v := range req.InvitedUserIDList { - chat.SuperGroupNotification(req.OperationID, v, v) + chat.SuperGroupNotification(tools.OperationID(ctx), v, v) } } return resp, nil @@ -458,10 +456,9 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou var okUserIDList []string if groupInfo.GroupType != constant.SuperGroup { opFlag := 0 - if !token_verify.IsManagerUserID(req.OpUserID) { - opInfo, err := rocksCache.GetGroupMemberInfoFromCache(ctx, req.GroupID, req.OpUserID) + if !token_verify.IsManagerUserID(tools.OpUserID(ctx)) { + opInfo, err := rocksCache.GetGroupMemberInfoFromCache(ctx, req.GroupID, tools.OpUserID(ctx)) if err != nil { - constant.SetErrorForResp(err, resp.CommonResp) return nil, err } if opInfo.RoleLevel == constant.GroupOrdinaryUsers { @@ -507,7 +504,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou err = imdb.DeleteGroupMemberByGroupIDAndUserID(req.GroupID, v) trace_log.SetCtxInfo(ctx, "RemoveGroupMember", err, "groupID", req.GroupID, "userID", v) if err != nil { - log.NewError(req.OperationID, "RemoveGroupMember failed ", err.Error(), req.GroupID, v) + log.NewError(tools.OperationID(ctx), "RemoveGroupMember failed ", err.Error(), req.GroupID, v) resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: -1}) } else { resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: 0}) @@ -517,7 +514,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou var reqPb pbUser.SetConversationReq var c pbConversation.Conversation for _, v := range okUserIDList { - reqPb.OperationID = req.OperationID + reqPb.OperationID = tools.OperationID(ctx) c.OwnerUserID = v c.ConversationID = utils.GetConversationIDBySessionType(req.GroupID, constant.GroupChatType) c.ConversationType = constant.GroupChatType @@ -554,7 +551,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou } go func() { for _, v := range req.KickedUserIDList { - chat.SuperGroupNotification(req.OperationID, v, v) + chat.SuperGroupNotification(tools.OperationID(ctx), v, v) } }() @@ -611,7 +608,7 @@ func (s *groupServer) GetGroupApplicationList(ctx context.Context, req *pbGroup. trace_log.SetCtxInfo(ctx, "GetRecvGroupApplicationList", nil, " FromUserID: ", req.FromUserID, "GroupApplicationList: ", reply) for _, v := range reply { node := open_im_sdk.GroupRequest{UserInfo: &open_im_sdk.PublicUserInfo{}, GroupInfo: &open_im_sdk.GroupInfo{}} - err := FillGroupInfoByGroupID(req.OperationID, v.GroupID, node.GroupInfo) + err := FillGroupInfoByGroupID(tools.OperationID(ctx), v.GroupID, node.GroupInfo) if err != nil { if !errors.Is(errors.Unwrap(err), constant.ErrDismissedAlready) { errResult = err @@ -619,7 +616,7 @@ func (s *groupServer) GetGroupApplicationList(ctx context.Context, req *pbGroup. continue } trace_log.SetCtxInfo(ctx, "FillGroupInfoByGroupID ", nil, " groupID: ", v.GroupID, " groupInfo: ", node.GroupInfo) - err = FillPublicUserInfoByUserID(req.OperationID, v.UserID, node.UserInfo) + err = FillPublicUserInfoByUserID(tools.OperationID(ctx), v.UserID, node.UserInfo) if err != nil { errResult = err continue @@ -640,7 +637,6 @@ func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsI for _, groupID := range req.GroupIDList { groupInfoFromRedis, err := rocksCache.GetGroupInfoFromCache(ctx, groupID) if err != nil { - constant.SetErrorForResp(err, resp.CommonResp) continue } var groupInfo open_im_sdk.GroupInfo @@ -665,15 +661,11 @@ func CheckPermission(ctx context.Context, groupID string, userID string) (err er func (s *groupServer) GroupApplicationResponse(ctx context.Context, req *pbGroup.GroupApplicationResponseReq) (*pbGroup.GroupApplicationResponseResp, error) { resp := &pbGroup.GroupApplicationResponseResp{} - if err := CheckPermission(ctx, req.GroupID, req.OpUserID); err != nil { + if err := CheckPermission(ctx, req.GroupID, tools.OpUserID(ctx)); err != nil { return nil, err } - groupRequest := imdb.GroupRequest{} - utils.CopyStructFields(&groupRequest, req) - groupRequest.UserID = req.FromUserID - groupRequest.HandleUserID = req.OpUserID - groupRequest.HandledTime = time.Now() - if err := (&imdb.GroupRequest{}).Update(ctx, []*imdb.GroupRequest{&groupRequest}); err != nil { + groupRequest := getDBGroupRequest(ctx, req) + if err := (&imdb.GroupRequest{}).Update(ctx, []*imdb.GroupRequest{groupRequest}); err != nil { return nil, err } groupInfo, err := rocksCache.GetGroupInfoFromCache(ctx, req.GroupID) @@ -693,13 +685,13 @@ func (s *groupServer) GroupApplicationResponse(ctx context.Context, req *pbGroup member.GroupID = req.GroupID member.UserID = req.FromUserID member.RoleLevel = constant.GroupOrdinaryUsers - member.OperatorUserID = req.OpUserID + member.OperatorUserID = tools.OpUserID(ctx) member.FaceURL = user.FaceURL member.Nickname = user.Nickname member.JoinSource = request.JoinSource member.InviterUserID = request.InviterUserID member.MuteEndTime = time.Unix(int64(time.Now().Second()), 0) - err = CallbackBeforeMemberJoinGroup(ctx, req.OperationID, &member, groupInfo.Ex) + err = CallbackBeforeMemberJoinGroup(ctx, tools.OperationID(ctx), &member, groupInfo.Ex) if err != nil { return nil, err } @@ -708,12 +700,12 @@ func (s *groupServer) GroupApplicationResponse(ctx context.Context, req *pbGroup if err != nil { return nil, err } - etcdCacheConn, err := fault_tolerant.GetDefaultConn(config.Config.RpcRegisterName.OpenImCacheName, req.OperationID) + etcdCacheConn, err := fault_tolerant.GetDefaultConn(config.Config.RpcRegisterName.OpenImCacheName, tools.OperationID(ctx)) if err != nil { return nil, err } cacheClient := pbCache.NewCacheClient(etcdCacheConn) - cacheResp, err := cacheClient.DelGroupMemberIDListFromCache(context.Background(), &pbCache.DelGroupMemberIDListFromCacheReq{OperationID: req.OperationID, GroupID: req.GroupID}) + cacheResp, err := cacheClient.DelGroupMemberIDListFromCache(context.Background(), &pbCache.DelGroupMemberIDListFromCacheReq{OperationID: tools.OperationID(ctx), GroupID: req.GroupID}) if err != nil { return nil, err } @@ -740,7 +732,7 @@ func (s *groupServer) GroupApplicationResponse(ctx context.Context, req *pbGroup func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) (*pbGroup.JoinGroupResp, error) { resp := &pbGroup.JoinGroupResp{} - if _, err := imdb.GetUserByUserID(req.OpUserID); err != nil { + if _, err := imdb.GetUserByUserID(tools.OpUserID(ctx)); err != nil { return nil, err } groupInfo, err := rocksCache.GetGroupInfoFromCache(ctx, req.GroupID) @@ -748,23 +740,22 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) return nil, err } if groupInfo.Status == constant.GroupStatusDismissed { - constant.SetErrorForResp(constant.ErrDismissedAlready, resp.CommonResp) return nil, utils.Wrap(constant.ErrDismissedAlready, "") } if groupInfo.NeedVerification == constant.Directly { if groupInfo.GroupType != constant.SuperGroup { - us, err := imdb.GetUserByUserID(req.OpUserID) + us, err := imdb.GetUserByUserID(tools.OpUserID(ctx)) if err != nil { return nil, err } //to group member - groupMember := imdb.GroupMember{GroupID: req.GroupID, RoleLevel: constant.GroupOrdinaryUsers, OperatorUserID: req.OpUserID} + groupMember := imdb.GroupMember{GroupID: req.GroupID, RoleLevel: constant.GroupOrdinaryUsers, OperatorUserID: tools.OpUserID(ctx)} utils.CopyStructFields(&groupMember, us) - if err := CallbackBeforeMemberJoinGroup(ctx, req.OperationID, &groupMember, groupInfo.Ex); err != nil { + if err := CallbackBeforeMemberJoinGroup(ctx, tools.OperationID(ctx), &groupMember, groupInfo.Ex); err != nil { return nil, err } - if err := s.DelGroupAndUserCache(ctx, req.GroupID, []string{req.OpUserID}); err != nil { + if err := s.DelGroupAndUserCache(ctx, req.GroupID, []string{tools.OpUserID(ctx)}); err != nil { return nil, err } err = imdb.InsertIntoGroupMember(groupMember) @@ -780,8 +771,8 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) } var reqPb pbUser.SetConversationReq var c pbConversation.Conversation - reqPb.OperationID = req.OperationID - c.OwnerUserID = req.OpUserID + reqPb.OperationID = tools.OperationID(ctx) + c.OwnerUserID = tools.OpUserID(ctx) c.ConversationID = utils.GetConversationIDBySessionType(req.GroupID, sessionType) c.ConversationType = int32(sessionType) c.GroupID = req.GroupID @@ -795,7 +786,7 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) client := pbUser.NewUserClient(etcdConn) respPb, err := client.SetConversation(context.Background(), &reqPb) trace_log.SetCtxInfo(ctx, "SetConversation", err, "req", reqPb, "resp", respPb) - chat.MemberEnterDirectlyNotification(req.GroupID, req.OpUserID, req.OperationID) + chat.MemberEnterDirectlyNotification(req.GroupID, tools.OpUserID(ctx), tools.OperationID(ctx)) return resp, nil } else { constant.SetErrorForResp(constant.ErrGroupTypeNotSupport, resp.CommonResp) @@ -803,7 +794,7 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) } } var groupRequest imdb.GroupRequest - groupRequest.UserID = req.OpUserID + groupRequest.UserID = tools.OpUserID(ctx) groupRequest.ReqMsg = req.ReqMessage groupRequest.GroupID = req.GroupID groupRequest.JoinSource = req.JoinSource @@ -811,7 +802,7 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) if err != nil { return nil, err } - chat.JoinGroupApplicationNotification(req) + chat.JoinGroupApplicationNotification(ctx, req) return resp, nil } @@ -823,50 +814,35 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) return nil, err } if groupInfo.GroupType != constant.SuperGroup { - _, err = rocksCache.GetGroupMemberInfoFromCache(ctx, req.GroupID, req.OpUserID) + _, err = rocksCache.GetGroupMemberInfoFromCache(ctx, req.GroupID, tools.OpUserID(ctx)) if err != nil { return nil, err } - if err := s.DelGroupAndUserCache(ctx, req.GroupID, []string{req.OpUserID}); err != nil { + if err := s.DelGroupAndUserCache(ctx, req.GroupID, []string{tools.OpUserID(ctx)}); err != nil { return nil, err } - err = imdb.DeleteGroupMemberByGroupIDAndUserID(req.GroupID, req.OpUserID) + err = imdb.DeleteGroupMemberByGroupIDAndUserID(req.GroupID, tools.OpUserID(ctx)) if err != nil { return nil, err } } else { - okUserIDList := []string{req.OpUserID} + okUserIDList := []string{tools.OpUserID(ctx)} if err := db.DB.RemoverUserFromSuperGroup(req.GroupID, okUserIDList); err != nil { return nil, err } } if groupInfo.GroupType != constant.SuperGroup { - _ = rocksCache.DelGroupMemberInfoFromCache(ctx, req.GroupID, req.OpUserID) + _ = rocksCache.DelGroupMemberInfoFromCache(ctx, req.GroupID, tools.OpUserID(ctx)) chat.MemberQuitNotification(req) } else { - _ = rocksCache.DelJoinedSuperGroupIDListFromCache(ctx, req.OpUserID) + _ = rocksCache.DelJoinedSuperGroupIDListFromCache(ctx, tools.OpUserID(ctx)) _ = rocksCache.DelGroupMemberListHashFromCache(ctx, req.GroupID) - chat.SuperGroupNotification(req.OperationID, req.OpUserID, req.OpUserID) + chat.SuperGroupNotification(tools.OperationID(ctx), tools.OpUserID(ctx), tools.OpUserID(ctx)) } return resp, nil } -func hasAccess(req *pbGroup.SetGroupInfoReq) bool { - if utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { - return true - } - groupUserInfo, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(req.GroupInfoForSet.GroupID, req.OpUserID) - if err != nil { - log.NewError(req.OperationID, "GetGroupMemberInfoByGroupIDAndUserID failed, ", err.Error(), req.GroupInfoForSet.GroupID, req.OpUserID) - return false - } - if groupUserInfo.RoleLevel == constant.GroupOwner || groupUserInfo.RoleLevel == constant.GroupAdmin { - return true - } - return false -} - func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInfoReq) (*pbGroup.SetGroupInfoResp, error) { resp := &pbGroup.SetGroupInfoResp{} @@ -931,7 +907,7 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf var groupInfo imdb.Group utils.CopyStructFields(&groupInfo, req.GroupInfoForSet) if req.GroupInfoForSet.Notification != "" { - groupInfo.NotificationUserID = req.OpUserID + groupInfo.NotificationUserID = tools.OpUserID(ctx) groupInfo.NotificationUpdateTime = time.Now() } if err := rocksCache.DelGroupInfoFromCache(ctx, req.GroupInfoForSet.GroupID); err != nil { @@ -942,11 +918,11 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf return nil, err } if changedType != 0 { - chat.GroupInfoSetNotification(req.OperationID, req.OpUserID, req.GroupInfoForSet.GroupID, groupName, notification, introduction, faceURL, req.GroupInfoForSet.NeedVerification) + chat.GroupInfoSetNotification(tools.OperationID(ctx), tools.OpUserID(ctx), req.GroupInfoForSet.GroupID, groupName, notification, introduction, faceURL, req.GroupInfoForSet.NeedVerification) } if req.GroupInfoForSet.Notification != "" { //get group member user id - getGroupMemberIDListFromCacheReq := &pbCache.GetGroupMemberIDListFromCacheReq{OperationID: req.OperationID, GroupID: req.GroupInfoForSet.GroupID} + getGroupMemberIDListFromCacheReq := &pbCache.GetGroupMemberIDListFromCacheReq{OperationID: tools.OperationID(ctx), GroupID: req.GroupInfoForSet.GroupID} etcdConn, err := getcdv3.GetConn(ctx, config.Config.RpcRegisterName.OpenImCacheName) if err != nil { return nil, err @@ -961,13 +937,13 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf } var conversationReq pbConversation.ModifyConversationFieldReq conversation := pbConversation.Conversation{ - OwnerUserID: req.OpUserID, + OwnerUserID: tools.OpUserID(ctx), ConversationID: utils.GetConversationIDBySessionType(req.GroupInfoForSet.GroupID, constant.GroupChatType), ConversationType: constant.GroupChatType, GroupID: req.GroupInfoForSet.GroupID, } conversationReq.Conversation = &conversation - conversationReq.OperationID = req.OperationID + conversationReq.OperationID = tools.OperationID(ctx) conversationReq.FieldType = constant.FieldGroupAtType conversation.GroupAtType = constant.GroupNotification conversationReq.UserIDList = cacheResp.UserIDList @@ -1080,7 +1056,7 @@ func (s *groupServer) GetGroupMembersCMS(ctx context.Context, req *pbGroup.GetGr if err != nil { return nil, err } - log.NewInfo(req.OperationID, groupMembersCount) + log.NewInfo(tools.OperationID(ctx), groupMembersCount) resp.MemberNums = int32(groupMembersCount) for _, groupMember := range groupMembers { member := open_im_sdk.GroupMemberFullInfo{} @@ -1125,7 +1101,7 @@ func (s *groupServer) GetUserReqApplicationList(ctx context.Context, req *pbGrou func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGroupReq) (*pbGroup.DismissGroupResp, error) { resp := &pbGroup.DismissGroupResp{} - if !token_verify.IsManagerUserID(req.OpUserID) && !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) { + if !token_verify.IsManagerUserID(tools.OpUserID(ctx)) && !imdb.IsGroupOwnerAdmin(req.GroupID, tools.OpUserID(ctx)) { return nil, utils.Wrap(constant.ErrIdentity, "") } @@ -1153,7 +1129,7 @@ func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGrou var reqPb pbUser.SetConversationReq var c pbConversation.Conversation for _, v := range memberList { - reqPb.OperationID = req.OperationID + reqPb.OperationID = tools.OperationID(ctx) c.OwnerUserID = v.UserID c.ConversationID = utils.GetConversationIDBySessionType(req.GroupID, constant.GroupChatType) c.ConversationType = constant.GroupChatType @@ -1182,7 +1158,7 @@ func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGrou func (s *groupServer) MuteGroupMember(ctx context.Context, req *pbGroup.MuteGroupMemberReq) (*pbGroup.MuteGroupMemberResp, error) { resp := &pbGroup.MuteGroupMemberResp{} - opFlag, err := s.getGroupUserLevel(req.GroupID, req.OpUserID) + opFlag, err := s.getGroupUserLevel(req.GroupID, tools.OpUserID(ctx)) if err != nil { return nil, err } @@ -1210,14 +1186,14 @@ func (s *groupServer) MuteGroupMember(ctx context.Context, req *pbGroup.MuteGrou if err != nil { return nil, err } - chat.GroupMemberMutedNotification(req.OperationID, req.OpUserID, req.GroupID, req.UserID, req.MutedSeconds) + chat.GroupMemberMutedNotification(tools.OperationID(ctx), tools.OpUserID(ctx), req.GroupID, req.UserID, req.MutedSeconds) return resp, nil } func (s *groupServer) CancelMuteGroupMember(ctx context.Context, req *pbGroup.CancelMuteGroupMemberReq) (*pbGroup.CancelMuteGroupMemberResp, error) { resp := &pbGroup.CancelMuteGroupMemberResp{} - opFlag, err := s.getGroupUserLevel(req.GroupID, req.OpUserID) + opFlag, err := s.getGroupUserLevel(req.GroupID, tools.OpUserID(ctx)) if err != nil { return nil, err } @@ -1245,14 +1221,14 @@ func (s *groupServer) CancelMuteGroupMember(ctx context.Context, req *pbGroup.Ca if err != nil { return nil, err } - chat.GroupMemberCancelMutedNotification(req.OperationID, req.OpUserID, req.GroupID, req.UserID) + chat.GroupMemberCancelMutedNotification(tools.OperationID(ctx), tools.OpUserID(ctx), req.GroupID, req.UserID) return resp, nil } func (s *groupServer) MuteGroup(ctx context.Context, req *pbGroup.MuteGroupReq) (*pbGroup.MuteGroupResp, error) { resp := &pbGroup.MuteGroupResp{} - opFlag, err := s.getGroupUserLevel(req.GroupID, req.OpUserID) + opFlag, err := s.getGroupUserLevel(req.GroupID, tools.OpUserID(ctx)) if err != nil { return nil, err } @@ -1285,14 +1261,14 @@ func (s *groupServer) MuteGroup(ctx context.Context, req *pbGroup.MuteGroupReq) return nil, err } - chat.GroupMutedNotification(req.OperationID, req.OpUserID, req.GroupID) + chat.GroupMutedNotification(tools.OperationID(ctx), tools.OpUserID(ctx), req.GroupID) return resp, nil } func (s *groupServer) CancelMuteGroup(ctx context.Context, req *pbGroup.CancelMuteGroupReq) (*pbGroup.CancelMuteGroupResp, error) { resp := &pbGroup.CancelMuteGroupResp{} - opFlag, err := s.getGroupUserLevel(req.GroupID, req.OpUserID) + opFlag, err := s.getGroupUserLevel(req.GroupID, tools.OpUserID(ctx)) if err != nil { return nil, err } @@ -1312,7 +1288,7 @@ func (s *groupServer) CancelMuteGroup(ctx context.Context, req *pbGroup.CancelMu // errMsg := req.OperationID + " mutedInfo.RoleLevel == constant.GroupAdmin " + req.GroupID + req.OpUserID + err.Error() // return &pbGroup.CancelMuteGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}}, nil //} - log.Debug(req.OperationID, "UpdateGroupInfoDefaultZero ", req.GroupID, map[string]interface{}{"status": constant.GroupOk}) + log.Debug(tools.OperationID(ctx), "UpdateGroupInfoDefaultZero ", req.GroupID, map[string]interface{}{"status": constant.GroupOk}) if err := rocksCache.DelGroupInfoFromCache(ctx, req.GroupID); err != nil { return nil, err } @@ -1320,22 +1296,20 @@ func (s *groupServer) CancelMuteGroup(ctx context.Context, req *pbGroup.CancelMu if err != nil { return nil, err } - chat.GroupCancelMutedNotification(req.OperationID, req.OpUserID, req.GroupID) + chat.GroupCancelMutedNotification(tools.OperationID(ctx), tools.OpUserID(ctx), req.GroupID) return resp, nil } func (s *groupServer) SetGroupMemberNickname(ctx context.Context, req *pbGroup.SetGroupMemberNicknameReq) (*pbGroup.SetGroupMemberNicknameResp, error) { resp := &pbGroup.SetGroupMemberNicknameResp{} - if req.OpUserID != req.UserID && !token_verify.IsManagerUserID(req.OpUserID) { + if tools.OpUserID(ctx) != req.UserID && !token_verify.IsManagerUserID(tools.OpUserID(ctx)) { return nil, utils.Wrap(constant.ErrIdentity, "") } cbReq := &pbGroup.SetGroupMemberInfoReq{ - GroupID: req.GroupID, - UserID: req.UserID, - OperationID: req.OperationID, - OpUserID: req.OpUserID, - Nickname: &wrapperspb.StringValue{Value: req.Nickname}, + GroupID: req.GroupID, + UserID: req.UserID, + Nickname: &wrapperspb.StringValue{Value: req.Nickname}, } if err := CallbackBeforeSetGroupMemberInfo(ctx, cbReq); err != nil { return nil, err @@ -1361,7 +1335,7 @@ func (s *groupServer) SetGroupMemberNickname(ctx context.Context, req *pbGroup.S if err := imdb.UpdateGroupMemberInfo(groupMemberInfo); err != nil { return nil, err } - chat.GroupMemberInfoSetNotification(req.OperationID, req.OpUserID, req.GroupID, req.UserID) + chat.GroupMemberInfoSetNotification(tools.OperationID(ctx), tools.OpUserID(ctx), req.GroupID, req.UserID) return resp, nil } @@ -1400,13 +1374,13 @@ func (s *groupServer) SetGroupMemberInfo(ctx context.Context, req *pbGroup.SetGr switch req.RoleLevel.Value { case constant.GroupOrdinaryUsers: //msg.GroupMemberRoleLevelChangeNotification(req.OperationID, req.OpUserID, req.GroupID, req.UserID, constant.GroupMemberSetToOrdinaryUserNotification) - chat.GroupMemberInfoSetNotification(req.OperationID, req.OpUserID, req.GroupID, req.UserID) + chat.GroupMemberInfoSetNotification(tools.OperationID(ctx), tools.OpUserID(ctx), req.GroupID, req.UserID) case constant.GroupAdmin, constant.GroupOwner: //msg.GroupMemberRoleLevelChangeNotification(req.OperationID, req.OpUserID, req.GroupID, req.UserID, constant.GroupMemberSetToAdminNotification) - chat.GroupMemberInfoSetNotification(req.OperationID, req.OpUserID, req.GroupID, req.UserID) + chat.GroupMemberInfoSetNotification(tools.OperationID(ctx), tools.OpUserID(ctx), req.GroupID, req.UserID) } } else { - chat.GroupMemberInfoSetNotification(req.OperationID, req.OpUserID, req.GroupID, req.UserID) + chat.GroupMemberInfoSetNotification(tools.OperationID(ctx), tools.OpUserID(ctx), req.GroupID, req.UserID) } return resp, nil } diff --git a/internal/rpc/msg/group_notification.go b/internal/rpc/msg/group_notification.go index 82255b5b0..ea5e14db2 100644 --- a/internal/rpc/msg/group_notification.go +++ b/internal/rpc/msg/group_notification.go @@ -6,10 +6,12 @@ import ( imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" + "Open_IM/pkg/common/tools" utils2 "Open_IM/pkg/common/utils" pbGroup "Open_IM/pkg/proto/group" open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" + "context" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" "google.golang.org/protobuf/types/known/wrapperspb" @@ -208,7 +210,7 @@ func groupNotification(contentType int32, m proto.Message, sendID, groupID, recv Notification(&n) } -//创建群后调用 +// 创建群后调用 func GroupCreatedNotification(operationID, opUserID, groupID string, initMemberList []string) { GroupCreatedTips := open_im_sdk.GroupCreatedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}, GroupOwnerUser: &open_im_sdk.GroupMemberFullInfo{}} @@ -240,8 +242,9 @@ func GroupCreatedNotification(operationID, opUserID, groupID string, initMemberL groupNotification(constant.GroupCreatedNotification, &GroupCreatedTips, opUserID, groupID, "", operationID) } -//群信息改变后掉用 -//groupName := "" +// 群信息改变后掉用 +// groupName := "" +// // notification := "" // introduction := "" // faceURL := "" @@ -371,36 +374,38 @@ func GroupMemberCancelMutedNotification(operationID, opUserID, groupID, groupMem groupNotification(constant.GroupMemberCancelMutedNotification, &tips, opUserID, groupID, "", operationID) } -//message ReceiveJoinApplicationTips{ -// GroupInfo Group = 1; -// PublicUserInfo Applicant = 2; -// string Reason = 3; -//} apply->all managers GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` +// message ReceiveJoinApplicationTips{ +// GroupInfo Group = 1; +// PublicUserInfo Applicant = 2; +// string Reason = 3; +// } apply->all managers GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` +// // ReqMessage string `protobuf:"bytes,2,opt,name=ReqMessage" json:"ReqMessage,omitempty"` // OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` // OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` -//申请进群后调用 -func JoinGroupApplicationNotification(req *pbGroup.JoinGroupReq) { +// +// 申请进群后调用 +func JoinGroupApplicationNotification(ctx context.Context, req *pbGroup.JoinGroupReq) { JoinGroupApplicationTips := open_im_sdk.JoinGroupApplicationTips{Group: &open_im_sdk.GroupInfo{}, Applicant: &open_im_sdk.PublicUserInfo{}} err := setGroupInfo(req.GroupID, JoinGroupApplicationTips.Group) if err != nil { - log.Error(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID) + log.Error(tools.OperationID(ctx), "setGroupInfo failed ", err.Error(), req.GroupID) return } - if err = setPublicUserInfo(req.OpUserID, JoinGroupApplicationTips.Applicant); err != nil { - log.Error(req.OperationID, "setPublicUserInfo failed ", err.Error(), req.OpUserID) + if err = setPublicUserInfo(tools.OpUserID(ctx), JoinGroupApplicationTips.Applicant); err != nil { + log.Error(tools.OperationID(ctx), "setPublicUserInfo failed ", err.Error(), tools.OpUserID(ctx)) return } JoinGroupApplicationTips.ReqMsg = req.ReqMessage managerList, err := imdb.GetOwnerManagerByGroupID(req.GroupID) if err != nil { - log.NewError(req.OperationID, "GetOwnerManagerByGroupId failed ", err.Error(), req.GroupID) + log.NewError(tools.OperationID(ctx), "GetOwnerManagerByGroupId failed ", err.Error(), req.GroupID) return } for _, v := range managerList { - groupNotification(constant.JoinGroupApplicationNotification, &JoinGroupApplicationTips, req.OpUserID, "", v.UserID, req.OperationID) - log.NewInfo(req.OperationID, "Notification ", v) + groupNotification(constant.JoinGroupApplicationNotification, &JoinGroupApplicationTips, tools.OpUserID(ctx), "", v.UserID, tools.OperationID(ctx)) + log.NewInfo(tools.OperationID(ctx), "Notification ", v) } } @@ -418,13 +423,14 @@ func MemberQuitNotification(req *pbGroup.QuitGroupReq) { groupNotification(constant.MemberQuitNotification, &MemberQuitTips, req.OpUserID, req.GroupID, "", req.OperationID) } -//message ApplicationProcessedTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo OpUser = 2; -// int32 Result = 3; -// string Reason = 4; -//} -//处理进群请求后调用 +// message ApplicationProcessedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo OpUser = 2; +// int32 Result = 3; +// string Reason = 4; +// } +// +// 处理进群请求后调用 func GroupApplicationAcceptedNotification(req *pbGroup.GroupApplicationResponseReq) { GroupApplicationAcceptedTips := open_im_sdk.GroupApplicationAcceptedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}, HandleMsg: req.HandledMsg} if err := setGroupInfo(req.GroupID, GroupApplicationAcceptedTips.Group); err != nil { @@ -506,13 +512,14 @@ func GroupDismissedNotification(req *pbGroup.DismissGroupReq) { groupNotification(constant.GroupDismissedNotification, &tips, req.OpUserID, req.GroupID, "", req.OperationID) } -//message MemberKickedTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo OpUser = 2; -// GroupMemberFullInfo KickedUser = 3; -// uint64 OperationTime = 4; -//} -//被踢后调用 +// message MemberKickedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo OpUser = 2; +// GroupMemberFullInfo KickedUser = 3; +// uint64 OperationTime = 4; +// } +// +// 被踢后调用 func MemberKickedNotification(req *pbGroup.KickGroupMemberReq, kickedUserIDList []string) { MemberKickedTips := open_im_sdk.MemberKickedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} if err := setGroupInfo(req.GroupID, MemberKickedTips.Group); err != nil { @@ -538,13 +545,14 @@ func MemberKickedNotification(req *pbGroup.KickGroupMemberReq, kickedUserIDList //} } -//message MemberInvitedTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo OpUser = 2; -// GroupMemberFullInfo InvitedUser = 3; -// uint64 OperationTime = 4; -//} -//被邀请进群后调用 +// message MemberInvitedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo OpUser = 2; +// GroupMemberFullInfo InvitedUser = 3; +// uint64 OperationTime = 4; +// } +// +// 被邀请进群后调用 func MemberInvitedNotification(operationID, groupID, opUserID, reason string, invitedUserIDList []string) { MemberInvitedTips := open_im_sdk.MemberInvitedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} if err := setGroupInfo(groupID, MemberInvitedTips.Group); err != nil { @@ -580,12 +588,13 @@ func MemberInvitedNotification(operationID, groupID, opUserID, reason string, in //群成员退群后调用 -//message MemberEnterTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo EntrantUser = 2; -// uint64 OperationTime = 3; -//} -//群成员主动申请进群,管理员同意后调用, +// message MemberEnterTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo EntrantUser = 2; +// uint64 OperationTime = 3; +// } +// +// 群成员主动申请进群,管理员同意后调用, func MemberEnterNotification(req *pbGroup.GroupApplicationResponseReq) { MemberEnterTips := open_im_sdk.MemberEnterTips{Group: &open_im_sdk.GroupInfo{}, EntrantUser: &open_im_sdk.GroupMemberFullInfo{}} if err := setGroupInfo(req.GroupID, MemberEnterTips.Group); err != nil { diff --git a/pkg/common/constant/err_info.go b/pkg/common/constant/err_info.go index 1e030e659..a578bafb2 100644 --- a/pkg/common/constant/err_info.go +++ b/pkg/common/constant/err_info.go @@ -16,6 +16,14 @@ type ErrInfo struct { DetailErrMsg string } +func NewErrInfo(code int32, msg, detail string) *ErrInfo { + return &ErrInfo{ + ErrCode: code, + ErrMsg: msg, + DetailErrMsg: detail, + } +} + func (e *ErrInfo) Error() string { return "errMsg: " + e.ErrMsg + " detail errMsg: " + e.DetailErrMsg } diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_model_k.go b/pkg/common/db/mysql_model/im_mysql_model/friend_model_k.go index 2f7433fcc..9f2105079 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_model_k.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_model_k.go @@ -8,8 +8,6 @@ import ( "time" ) -var FriendDB *gorm.DB - type Friend struct { OwnerUserID string `gorm:"column:owner_user_id;primary_key;size:64"` FriendUserID string `gorm:"column:friend_user_id;primary_key;size:64"` @@ -18,49 +16,54 @@ type Friend struct { AddSource int32 `gorm:"column:add_source"` OperatorUserID string `gorm:"column:operator_user_id;size:64"` Ex string `gorm:"column:ex;size:1024"` + db *gorm.DB `gorm:"-"` } -func (*Friend) Create(ctx context.Context, friends []*Friend) (err error) { +func NewFriend(db *gorm.DB) *Friend { + return &Friend{db: db} +} + +func (f *Friend) Create(ctx context.Context, friends []*Friend) (err error) { defer func() { trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "friends", friends) }() - err = utils.Wrap(FriendDB.Create(&friends).Error, "") + err = utils.Wrap(f.db.Create(&friends).Error, "") return err } -func (*Friend) Delete(ctx context.Context, ownerUserID string, friendUserIDs []string) (err error) { +func (f *Friend) Delete(ctx context.Context, ownerUserID string, friendUserIDs []string) (err error) { defer func() { trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "friendUserIDs", friendUserIDs) }() - err = utils.Wrap(FriendDB.Where("owner_user_id = ? and friend_user_id in (?)", ownerUserID, friendUserIDs).Delete(&Friend{}).Error, "") + err = utils.Wrap(f.db.Where("owner_user_id = ? and friend_user_id in (?)", ownerUserID, friendUserIDs).Delete(&Friend{}).Error, "") return err } -func (*Friend) UpdateByMap(ctx context.Context, ownerUserID string, args map[string]interface{}) (err error) { +func (f *Friend) UpdateByMap(ctx context.Context, ownerUserID string, args map[string]interface{}) (err error) { defer func() { trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "args", args) }() - return utils.Wrap(FriendDB.Where("owner_user_id = ?", ownerUserID).Updates(args).Error, "") + return utils.Wrap(f.db.Where("owner_user_id = ?", ownerUserID).Updates(args).Error, "") } -func (*Friend) Update(ctx context.Context, friends []*Friend) (err error) { +func (f *Friend) Update(ctx context.Context, friends []*Friend) (err error) { defer func() { trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "friends", friends) }() - return utils.Wrap(FriendDB.Updates(&friends).Error, "") + return utils.Wrap(f.db.Updates(&friends).Error, "") } -func (*Friend) Find(ctx context.Context, ownerUserID string) (friends []*Friend, err error) { +func (f *Friend) Find(ctx context.Context, ownerUserID string) (friends []*Friend, err error) { defer func() { trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "friends", friends) }() - err = utils.Wrap(FriendDB.Where("owner_user_id = ?", ownerUserID).Find(&friends).Error, "") + err = utils.Wrap(f.db.Where("owner_user_id = ?", ownerUserID).Find(&friends).Error, "") return friends, err } -func (*Friend) Take(ctx context.Context, ownerUserID, friendUserID string) (group *Group, err error) { - group = &Group{} - defer trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "friendUserID", friendUserID, "group", *group) - err = utils.Wrap(FriendDB.Where("owner_user_id = ? and friend_user_id", ownerUserID, friendUserID).Take(group).Error, "") - return group, err +func (f *Friend) Take(ctx context.Context, ownerUserID, friendUserID string) (friend *Friend, err error) { + friend = &Friend{} + defer trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "friendUserID", friendUserID, "group", *friend) + err = utils.Wrap(f.db.Where("owner_user_id = ? and friend_user_id", ownerUserID, friendUserID).Take(friend).Error, "") + return friend, err } diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go index 5d67d6245..ce0563c29 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go @@ -1,7 +1,9 @@ package im_mysql_model import ( + "Open_IM/pkg/common/trace_log" "Open_IM/pkg/utils" + "context" "gorm.io/gorm" "time" ) @@ -18,10 +20,56 @@ type FriendRequest struct { HandleMsg string `gorm:"column:handle_msg;size:255"` HandleTime time.Time `gorm:"column:handle_time"` Ex string `gorm:"column:ex;size:1024"` + db *gorm.DB `gorm:"-"` } -func (FriendRequest) TableName() string { - return "friend_requests" +func NewFriendRequest(db *gorm.DB) *FriendRequest { + return &FriendRequest{db: db} +} + +func (f *FriendRequest) Create(ctx context.Context, friends []*FriendRequest) (err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "friends", friends) + }() + err = utils.Wrap(f.db.Create(&friends).Error, "") + return err +} + +func (f *FriendRequest) Delete(ctx context.Context, fromUserID, toUserID string) (err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "fromUserID", fromUserID, "toUserID", toUserID) + }() + err = utils.Wrap(f.db.Where("from_user_id = ? and to_user_id = ?", fromUserID, toUserID).Delete(&FriendRequest{}).Error, "") + return err +} + +func (f *FriendRequest) UpdateByMap(ctx context.Context, ownerUserID string, args map[string]interface{}) (err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "args", args) + }() + return utils.Wrap(f.db.Where("owner_user_id = ?", ownerUserID).Updates(args).Error, "") +} + +func (f *FriendRequest) Update(ctx context.Context, friends []*FriendRequest) (err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "friends", friends) + }() + return utils.Wrap(f.db.Updates(&friends).Error, "") +} + +func (f *FriendRequest) Find(ctx context.Context, ownerUserID string) (friends []*FriendRequest, err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "friends", friends) + }() + err = utils.Wrap(f.db.Where("owner_user_id = ?", ownerUserID).Find(&friends).Error, "") + return friends, err +} + +func (f *FriendRequest) Take(ctx context.Context, ownerUserID, friendUserID string) (friend *FriendRequest, err error) { + friend = &FriendRequest{} + defer trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "ownerUserID", ownerUserID, "friendUserID", friendUserID, "group", *friend) + err = utils.Wrap(f.db.Where("owner_user_id = ? and friend_user_id", ownerUserID, friendUserID).Take(friend).Error, "") + return friend, err } // who apply to add me diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_model_k.go b/pkg/common/db/mysql_model/im_mysql_model/group_model_k.go index 60eab444e..213347758 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_model_k.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_model_k.go @@ -57,12 +57,12 @@ func (*Group) Update(ctx context.Context, groups []*Group) (err error) { return utils.Wrap(GroupDB.Updates(&groups).Error, "") } -func (*Group) Find(ctx context.Context, groupIDs []string) (groupList []*Group, err error) { +func (*Group) Find(ctx context.Context, groupIDs []string) (groups []*Group, err error) { defer func() { - trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDList", groupIDs, "groupList", groupList) + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs, "groups", groups) }() - err = utils.Wrap(GroupDB.Where("group_id in (?)", groupIDs).Find(&groupList).Error, "") - return groupList, err + err = utils.Wrap(GroupDB.Where("group_id in (?)", groupIDs).Find(&groups).Error, "") + return groups, err } func (*Group) Take(ctx context.Context, groupID string) (group *Group, err error) { diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index 7236cf382..06a09f16a 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -1,24 +1,13 @@ package im_mysql_model -//type GroupRequest struct { -// UserID string `gorm:"column:user_id;primaryKey;"` -// GroupID string `gorm:"column:group_id;primaryKey;"` -// HandleResult int32 `gorm:"column:handle_result"` -// ReqMsg string `gorm:"column:req_msg"` -// HandledMsg string `gorm:"column:handled_msg"` -// ReqTime time.Time `gorm:"column:req_time"` -// HandleUserID string `gorm:"column:handle_user_id"` -// HandledTime time.Time `gorm:"column:handle_time"` -// Ex string `gorm:"column:ex"` -//} - +// //func UpdateGroupRequest(groupRequest GroupRequest) error { // if groupRequest.HandledTime.Unix() < 0 { // groupRequest.HandledTime = utils.UnixSecondToTime(0) // } // return db.DB.MysqlDB.DefaultGormDB().Table("group_requests").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Updates(&groupRequest).Error //} - +// //func InsertIntoGroupRequest(toInsertInfo GroupRequest) error { // DelGroupRequestByGroupIDAndUserID(toInsertInfo.GroupID, toInsertInfo.UserID) // if toInsertInfo.HandledTime.Unix() < 0 { @@ -40,7 +29,7 @@ package im_mysql_model // } // return nil //} - +// //func GetGroupRequestByGroupIDAndUserID(groupID, userID string) (*GroupRequest, error) { // var groupRequest GroupRequest // err := db.DB.MysqlDB.DefaultGormDB().Table("group_requests").Where("user_id=? and group_id=?", userID, groupID).Take(&groupRequest).Error @@ -49,7 +38,7 @@ package im_mysql_model // } // return &groupRequest, nil //} - +// //func DelGroupRequestByGroupIDAndUserID(groupID, userID string) error { // return db.DB.MysqlDB.DefaultGormDB().Table("group_requests").Where("group_id=? and user_id=?", groupID, userID).Delete(GroupRequest{}).Error //} @@ -62,8 +51,8 @@ package im_mysql_model // } // return groupRequestList, nil //} - -// received +// +//received //func GetRecvGroupApplicationList(userID string) ([]GroupRequest, error) { // var groupRequestList []GroupRequest // memberList, err := GetGroupMemberListByUserID(userID) @@ -87,7 +76,7 @@ package im_mysql_model // err := db.DB.MysqlDB.DefaultGormDB().Table("group_requests").Where("user_id=?", userID).Find(&groupRequestList).Error // return groupRequestList, err //} - +// // //func GroupApplicationResponse(pb *group.GroupApplicationResponseReq) (*group.CommonResp, error) { // @@ -149,7 +138,7 @@ package im_mysql_model // // return &group.GroupApplicationResponseResp{}, nil //} - +// //func FindGroupBeInvitedRequestInfoByUidAndGroupID(groupId, uid string) (*GroupRequest, error) { // dbConn, err := db.DB.MysqlDB.DefaultGormDB() // if err != nil { @@ -163,7 +152,7 @@ package im_mysql_model // return &beInvitedRequestUserInfo, nil // //} - +// //func InsertGroupRequest(groupId, fromUser, fromUserNickName, fromUserFaceUrl, toUser, requestMsg, handledMsg string, handleStatus int) error { // return nil //} diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model_k.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model_k.go index 1b4ae79a7..1f80452cd 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model_k.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model_k.go @@ -1,7 +1,6 @@ package im_mysql_model import ( - "Open_IM/pkg/common/constant" "Open_IM/pkg/common/trace_log" "Open_IM/pkg/utils" "context" @@ -31,35 +30,35 @@ func (GroupRequest) TableName() string { func (*GroupRequest) Create(ctx context.Context, groupRequests []*GroupRequest) (err error) { defer func() { - trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "groupRequests", groupRequests) + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupRequests", groupRequests) }() return utils.Wrap(GroupRequestDB.Create(&groupRequests).Error, utils.GetSelfFuncName()) } func (*GroupRequest) Delete(ctx context.Context, groupRequests []*GroupRequest) (err error) { defer func() { - trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "groupRequests", groupRequests) + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupRequests", groupRequests) }() return utils.Wrap(GroupRequestDB.Delete(&groupRequests).Error, utils.GetSelfFuncName()) } func (*GroupRequest) UpdateByMap(ctx context.Context, groupID string, userID string, args map[string]interface{}) (err error) { defer func() { - trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "groupID", groupID, "userID", userID, "args", args) + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "userID", userID, "args", args) }() return utils.Wrap(GroupRequestDB.Where("group_id = ? and user_id = ? ", groupID, userID).Updates(args).Error, utils.GetSelfFuncName()) } func (*GroupRequest) Update(ctx context.Context, groupRequests []*GroupRequest) (err error) { defer func() { - trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "groupRequests", groupRequests) + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupRequests", groupRequests) }() return utils.Wrap(GroupRequestDB.Updates(&groupRequests).Error, utils.GetSelfFuncName()) } func (*GroupRequest) Find(ctx context.Context, groupRequests []*GroupRequest) (resultGroupRequests []*GroupRequest, err error) { defer func() { - trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "groupRequests", groupRequests, "resultGroupRequests", resultGroupRequests) + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupRequests", groupRequests, "resultGroupRequests", resultGroupRequests) }() var where [][]interface{} for _, groupMember := range groupRequests { @@ -71,163 +70,7 @@ func (*GroupRequest) Find(ctx context.Context, groupRequests []*GroupRequest) (r func (*GroupRequest) Take(ctx context.Context, groupID string, userID string) (groupRequest *GroupRequest, err error) { groupRequest = &GroupRequest{} defer func() { - trace_log.SetCtxDebug(ctx, utils.GetSelfFuncName(), err, "groupID", groupID, "userID", userID, "groupRequest", *groupRequest) + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "userID", userID, "groupRequest", *groupRequest) }() return groupRequest, utils.Wrap(GroupRequestDB.Where("group_id = ? and user_id = ? ", groupID, userID).Take(groupRequest).Error, utils.GetSelfFuncName()) } - -//func UpdateGroupRequest(groupRequest GroupRequest) error { -// if groupRequest.HandledTime.Unix() < 0 { -// groupRequest.HandledTime = utils.UnixSecondToTime(0) -// } -// return db.DB.MysqlDB.DefaultGormDB().Table("group_requests").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Updates(&groupRequest).Error -//} - -func InsertIntoGroupRequest(toInsertInfo GroupRequest) error { - DelGroupRequestByGroupIDAndUserID(toInsertInfo.GroupID, toInsertInfo.UserID) - if toInsertInfo.HandledTime.Unix() < 0 { - toInsertInfo.HandledTime = utils.UnixSecondToTime(0) - } - u := GroupRequestDB.Table("group_requests").Where("group_id=? and user_id=?", toInsertInfo.GroupID, toInsertInfo.UserID).Updates(&toInsertInfo) - if u.RowsAffected != 0 { - return nil - } - - toInsertInfo.ReqTime = time.Now() - if toInsertInfo.HandledTime.Unix() < 0 { - toInsertInfo.HandledTime = utils.UnixSecondToTime(0) - } - - err := GroupRequestDB.Create(&toInsertInfo).Error - if err != nil { - return err - } - return nil -} - -func GetGroupRequestByGroupIDAndUserID(groupID, userID string) (*GroupRequest, error) { - var groupRequest GroupRequest - err := GroupRequestDB.Where("user_id=? and group_id=?", userID, groupID).Take(&groupRequest).Error - if err != nil { - return nil, err - } - return &groupRequest, nil -} - -func DelGroupRequestByGroupIDAndUserID(groupID, userID string) error { - return GroupRequestDB.Table("group_requests").Where("group_id=? and user_id=?", groupID, userID).Delete(GroupRequest{}).Error -} - -func GetGroupRequestByGroupID(groupID string) ([]GroupRequest, error) { - var groupRequestList []GroupRequest - err := GroupRequestDB.Table("group_requests").Where("group_id=?", groupID).Find(&groupRequestList).Error - if err != nil { - return nil, err - } - return groupRequestList, nil -} - -// received -func GetRecvGroupApplicationList(userID string) ([]GroupRequest, error) { - var groupRequestList []GroupRequest - memberList, err := GetGroupMemberListByUserID(userID) - if err != nil { - return nil, utils.Wrap(err, utils.GetSelfFuncName()) - } - for _, v := range memberList { - if v.RoleLevel > constant.GroupOrdinaryUsers { - list, err := GetGroupRequestByGroupID(v.GroupID) - if err != nil { - continue - } - groupRequestList = append(groupRequestList, list...) - } - } - return groupRequestList, nil -} - -func GetUserReqGroupByUserID(userID string) ([]GroupRequest, error) { - var groupRequestList []GroupRequest - err := GroupRequestDB.Table("group_requests").Where("user_id=?", userID).Find(&groupRequestList).Error - return groupRequestList, err -} - -// -//func GroupApplicationResponse(pb *group.GroupApplicationResponseReq) (*group.CommonResp, error) { -// -// ownerUser, err := FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.OwnerID) -// if err != nil { -// log.ErrorByKv("FindGroupMemberInfoByGroupIdAndUserId failed", pb.OperationID, "groupId", pb.GroupID, "ownerID", pb.OwnerID) -// return nil, err -// } -// if ownerUser.AdministratorLevel <= 0 { -// return nil, errors.New("insufficient permissions") -// } -// -// dbConn, err := db.DB.MysqlDB.DefaultGormDB() -// if err != nil { -// return nil, err -// } -// var groupRequest GroupRequest -// err = dbConn.Raw("select * from `group_request` where handled_user = ? and group_id = ? and from_user_id = ? and to_user_id = ?", -// "", pb.GroupID, pb.FromUserID, pb.ToUserID).Scan(&groupRequest).Error -// if err != nil { -// log.ErrorByKv("find group_request info failed", pb.OperationID, "groupId", pb.GroupID, "fromUserId", pb.FromUserID, "toUserId", pb.OwnerID) -// return nil, err -// } -// -// if groupRequest.Flag != 0 { -// return nil, errors.New("application has already handle") -// } -// -// var saveFlag int -// if pb.HandleResult == 0 { -// saveFlag = -1 -// } else if pb.HandleResult == 1 { -// saveFlag = 1 -// } else { -// return nil, errors.New("parma HandleResult error") -// } -// err = dbConn.Exec("update `group_request` set flag = ?, handled_msg = ?, handled_user = ? where group_id = ? and from_user_id = ? and to_user_id = ?", -// saveFlag, pb.HandledMsg, pb.OwnerID, groupRequest.GroupID, groupRequest.FromUserID, groupRequest.ToUserID).Error -// if err != nil { -// log.ErrorByKv("update group request failed", pb.OperationID, "groupID", pb.GroupID, "flag", saveFlag, "ownerId", pb.OwnerID, "fromUserId", pb.FromUserID, "toUserID", pb.ToUserID) -// return nil, err -// } -// -// if saveFlag == 1 { -// if groupRequest.ToUserID == "0" { -// err = InsertIntoGroupMember(pb.GroupID, pb.FromUserID, groupRequest.FromUserNickname, groupRequest.FromUserFaceUrl, 0) -// if err != nil { -// log.ErrorByKv("InsertIntoGroupMember failed", pb.OperationID, "groupID", pb.GroupID, "fromUserId", pb.FromUserID) -// return nil, err -// } -// } else { -// err = InsertIntoGroupMember(pb.GroupID, pb.ToUserID, groupRequest.ToUserNickname, groupRequest.ToUserFaceUrl, 0) -// if err != nil { -// log.ErrorByKv("InsertIntoGroupMember failed", pb.OperationID, "groupID", pb.GroupID, "fromUserId", pb.FromUserID) -// return nil, err -// } -// } -// } -// -// return &group.GroupApplicationResponseResp{}, nil -//} - -//func FindGroupBeInvitedRequestInfoByUidAndGroupID(groupId, uid string) (*GroupRequest, error) { -// dbConn, err := db.DB.MysqlDB.DefaultGormDB() -// if err != nil { -// return nil, err -// } -// var beInvitedRequestUserInfo GroupRequest -// err = dbConn.Table("group_request").Where("to_user_id=? and group_id=?", uid, groupId).Find(&beInvitedRequestUserInfo).Error -// if err != nil { -// return nil, err -// } -// return &beInvitedRequestUserInfo, nil -// -//} - -//func InsertGroupRequest(groupId, fromUser, fromUserNickName, fromUserFaceUrl, toUser, requestMsg, handledMsg string, handleStatus int) error { -// return nil -//} diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go index 9cd4dd586..14d91bf85 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go @@ -8,8 +8,6 @@ import ( "time" ) -var BlackDB *gorm.DB - type Black struct { OwnerUserID string `gorm:"column:owner_user_id;primary_key;size:64"` BlockUserID string `gorm:"column:block_user_id;primary_key;size:64"` @@ -17,6 +15,65 @@ type Black struct { AddSource int32 `gorm:"column:add_source"` OperatorUserID string `gorm:"column:operator_user_id;size:64"` Ex string `gorm:"column:ex;size:1024"` + db *gorm.DB `gorm:"-"` +} + +func NewBlack(db *gorm.DB) *Black { + return &Black{db: db} +} + +func (b *Black) Create(ctx context.Context, blacks []*Black) (err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "blacks", blacks) + }() + return utils.Wrap(b.db.Create(&blacks).Error, "") +} + +func (b *Black) Delete(ctx context.Context, blacks []*Black) (err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "blacks", blacks) + }() + return utils.Wrap(GroupMemberDB.Delete(blacks).Error, "") +} + +func (b *Black) UpdateByMap(ctx context.Context, ownerUserID, blockUserID string, args map[string]interface{}) (err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "blockUserID", blockUserID, "args", args) + }() + return utils.Wrap(b.db.Where("block_user_id = ? and block_user_id = ?", ownerUserID, blockUserID).Updates(args).Error, "") +} + +func (b *Black) Update(ctx context.Context, blacks []*Black) (err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "blacks", blacks) + }() + return utils.Wrap(b.db.Updates(&blacks).Error, "") +} + +func (b *Black) Find(ctx context.Context, blacks []Black) (blackList []*Black, err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "blacks", blacks, "blackList", blackList) + }() + var where [][]interface{} + for _, black := range blacks { + where = append(where, []interface{}{black.OwnerUserID, black.BlockUserID}) + } + return blackList, utils.Wrap(GroupMemberDB.Where("(owner_user_id, block_user_id) in ?", where).Find(&blackList).Error, "") +} + +func (b *Black) Take(ctx context.Context, blackID string) (black *Black, err error) { + black = &Black{} + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "blackID", blackID, "black", *black) + }() + return black, utils.Wrap(b.db.Where("black_id = ?", blackID).Take(black).Error, "") +} + +func (b *Black) FindByOwnerUserID(ctx context.Context, ownerUserID string) (blackList []*Black, err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "blackList", blackList) + }() + return blackList, utils.Wrap(GroupMemberDB.Where("owner_user_id = ?", ownerUserID).Find(&blackList).Error, "") } func InsertInToUserBlackList(ctx context.Context, black Black) (err error) { @@ -47,7 +104,7 @@ func GetBlackListByUserID(ownerUserID string) ([]Black, error) { func GetBlackIDListByUserID(ownerUserID string) ([]string, error) { var blackIDList []string - err := BlackDB.Where("owner_user_id=?", ownerUserID).Pluck("block_user_id", &blackIDList).Error + err := b.db.Where("owner_user_id=?", ownerUserID).Pluck("block_user_id", &blackIDList).Error if err != nil { return nil, err } diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 9d8a1ba64..21d68d003 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -20,22 +20,6 @@ type BlackList struct { EndDisableTime time.Time `gorm:"column:end_disable_time"` } -type User struct { - UserID string `gorm:"column:user_id;primary_key;size:64"` - Nickname string `gorm:"column:name;size:255"` - FaceURL string `gorm:"column:face_url;size:255"` - Gender int32 `gorm:"column:gender"` - PhoneNumber string `gorm:"column:phone_number;size:32"` - Birth time.Time `gorm:"column:birth"` - Email string `gorm:"column:email;size:64"` - Ex string `gorm:"column:ex;size:1024"` - CreateTime time.Time `gorm:"column:create_time;index:create_time"` - AppMangerLevel int32 `gorm:"column:app_manger_level"` - GlobalRecvMsgOpt int32 `gorm:"column:global_recv_msg_opt"` - - status int32 `gorm:"column:status"` -} - func UserRegister(user User) error { user.CreateTime = time.Now() if user.AppMangerLevel == 0 { diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model_k.go b/pkg/common/db/mysql_model/im_mysql_model/user_model_k.go new file mode 100644 index 000000000..5c0e6e26b --- /dev/null +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model_k.go @@ -0,0 +1,66 @@ +package im_mysql_model + +import ( + "Open_IM/pkg/common/trace_log" + "Open_IM/pkg/utils" + "context" + "gorm.io/gorm" + "time" +) + +var userDB *gorm.DB + +type User struct { + UserID string `gorm:"column:user_id;primary_key;size:64"` + Nickname string `gorm:"column:name;size:255"` + FaceURL string `gorm:"column:face_url;size:255"` + Gender int32 `gorm:"column:gender"` + PhoneNumber string `gorm:"column:phone_number;size:32"` + Birth time.Time `gorm:"column:birth"` + Email string `gorm:"column:email;size:64"` + Ex string `gorm:"column:ex;size:1024"` + CreateTime time.Time `gorm:"column:create_time;index:create_time"` + AppMangerLevel int32 `gorm:"column:app_manger_level"` + GlobalRecvMsgOpt int32 `gorm:"column:global_recv_msg_opt"` + + status int32 `gorm:"column:status"` +} + +func (*User) Create(ctx context.Context, users []*User) (err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "users", users) + }() + err = utils.Wrap(userDB.Create(&users).Error, "") + return err +} + +func (*User) UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "args", args) + }() + return utils.Wrap(userDB.Where("user_id = ?", userID).Updates(args).Error, "") +} + +func (*User) Update(ctx context.Context, users []*User) (err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "users", users) + }() + return utils.Wrap(userDB.Updates(&users).Error, "") +} + +func (*User) Find(ctx context.Context, userIDs []string) (users []*User, err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userIDs", userIDs, "users", users) + }() + err = utils.Wrap(userDB.Where("user_id in (?)", userIDs).Find(&users).Error, "") + return users, err +} + +func (*User) Take(ctx context.Context, userID string) (user *User, err error) { + user = &User{} + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "user", *user) + }() + err = utils.Wrap(userDB.Where("user_id = ?", userID).Take(&user).Error, "") + return user, err +} diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go index c448891b9..db483d834 100644 --- a/pkg/proto/group/group.pb.go +++ b/pkg/proto/group/group.pb.go @@ -37,7 +37,7 @@ func (m *GroupAddMemberInfo) Reset() { *m = GroupAddMemberInfo{} } func (m *GroupAddMemberInfo) String() string { return proto.CompactTextString(m) } func (*GroupAddMemberInfo) ProtoMessage() {} func (*GroupAddMemberInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{0} + return fileDescriptor_group_908b1d0f9beeddfc, []int{0} } func (m *GroupAddMemberInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupAddMemberInfo.Unmarshal(m, b) @@ -74,8 +74,6 @@ func (m *GroupAddMemberInfo) GetRoleLevel() int32 { type CreateGroupReq struct { InitMemberList []*GroupAddMemberInfo `protobuf:"bytes,1,rep,name=initMemberList" json:"initMemberList,omitempty"` GroupInfo *sdk_ws.GroupInfo `protobuf:"bytes,2,opt,name=groupInfo" json:"groupInfo,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` - OpUserID string `protobuf:"bytes,4,opt,name=opUserID" json:"opUserID,omitempty"` OwnerUserID string `protobuf:"bytes,5,opt,name=ownerUserID" json:"ownerUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -86,7 +84,7 @@ func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} } func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) } func (*CreateGroupReq) ProtoMessage() {} func (*CreateGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{1} + return fileDescriptor_group_908b1d0f9beeddfc, []int{1} } func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b) @@ -120,20 +118,6 @@ func (m *CreateGroupReq) GetGroupInfo() *sdk_ws.GroupInfo { return nil } -func (m *CreateGroupReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *CreateGroupReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - func (m *CreateGroupReq) GetOwnerUserID() string { if m != nil { return m.OwnerUserID @@ -142,18 +126,17 @@ func (m *CreateGroupReq) GetOwnerUserID() string { } type CreateGroupResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - GroupInfo *sdk_ws.GroupInfo `protobuf:"bytes,3,opt,name=groupInfo" json:"groupInfo,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupInfo *sdk_ws.GroupInfo `protobuf:"bytes,3,opt,name=groupInfo" json:"groupInfo,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} } func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) } func (*CreateGroupResp) ProtoMessage() {} func (*CreateGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{2} + return fileDescriptor_group_908b1d0f9beeddfc, []int{2} } func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b) @@ -173,13 +156,6 @@ func (m *CreateGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_CreateGroupResp proto.InternalMessageInfo -func (m *CreateGroupResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - func (m *CreateGroupResp) GetGroupInfo() *sdk_ws.GroupInfo { if m != nil { return m.GroupInfo @@ -189,8 +165,6 @@ func (m *CreateGroupResp) GetGroupInfo() *sdk_ws.GroupInfo { type GetGroupsInfoReq struct { GroupIDList []string `protobuf:"bytes,1,rep,name=groupIDList" json:"groupIDList,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - OpUserID string `protobuf:"bytes,3,opt,name=opUserID" json:"opUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -200,7 +174,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} } func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoReq) ProtoMessage() {} func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{3} + return fileDescriptor_group_908b1d0f9beeddfc, []int{3} } func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b) @@ -227,22 +201,7 @@ func (m *GetGroupsInfoReq) GetGroupIDList() []string { return nil } -func (m *GetGroupsInfoReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *GetGroupsInfoReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - type GetGroupsInfoResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` GroupInfoList []*sdk_ws.GroupInfo `protobuf:"bytes,3,rep,name=groupInfoList" json:"groupInfoList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -253,7 +212,7 @@ func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} } func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoResp) ProtoMessage() {} func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{4} + return fileDescriptor_group_908b1d0f9beeddfc, []int{4} } func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b) @@ -273,13 +232,6 @@ func (m *GetGroupsInfoResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupsInfoResp proto.InternalMessageInfo -func (m *GetGroupsInfoResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - func (m *GetGroupsInfoResp) GetGroupInfoList() []*sdk_ws.GroupInfo { if m != nil { return m.GroupInfoList @@ -289,8 +241,6 @@ func (m *GetGroupsInfoResp) GetGroupInfoList() []*sdk_ws.GroupInfo { type SetGroupInfoReq struct { GroupInfoForSet *sdk_ws.GroupInfoForSet `protobuf:"bytes,1,opt,name=groupInfoForSet" json:"groupInfoForSet,omitempty"` - OpUserID string `protobuf:"bytes,2,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -300,7 +250,7 @@ func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} } func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoReq) ProtoMessage() {} func (*SetGroupInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{5} + return fileDescriptor_group_908b1d0f9beeddfc, []int{5} } func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b) @@ -327,32 +277,17 @@ func (m *SetGroupInfoReq) GetGroupInfoForSet() *sdk_ws.GroupInfoForSet { return nil } -func (m *SetGroupInfoReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - -func (m *SetGroupInfoReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - type SetGroupInfoResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *SetGroupInfoResp) Reset() { *m = SetGroupInfoResp{} } func (m *SetGroupInfoResp) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoResp) ProtoMessage() {} func (*SetGroupInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{6} + return fileDescriptor_group_908b1d0f9beeddfc, []int{6} } func (m *SetGroupInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupInfoResp.Unmarshal(m, b) @@ -372,27 +307,19 @@ func (m *SetGroupInfoResp) XXX_DiscardUnknown() { var xxx_messageInfo_SetGroupInfoResp proto.InternalMessageInfo -func (m *SetGroupInfoResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type GetGroupApplicationListReq struct { - OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - FromUserID string `protobuf:"bytes,3,opt,name=fromUserID" json:"fromUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` + FromUserID string `protobuf:"bytes,3,opt,name=fromUserID" json:"fromUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationListReq{} } func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListReq) ProtoMessage() {} func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{7} + return fileDescriptor_group_908b1d0f9beeddfc, []int{7} } func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b) @@ -412,18 +339,11 @@ func (m *GetGroupApplicationListReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupApplicationListReq proto.InternalMessageInfo -func (m *GetGroupApplicationListReq) GetOpUserID() string { +func (m *GetGroupApplicationListReq) GetPagination() *sdk_ws.RequestPagination { if m != nil { - return m.OpUserID + return m.Pagination } - return "" -} - -func (m *GetGroupApplicationListReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" + return nil } func (m *GetGroupApplicationListReq) GetFromUserID() string { @@ -434,7 +354,7 @@ func (m *GetGroupApplicationListReq) GetFromUserID() string { } type GetGroupApplicationListResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` + Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` GroupRequestList []*sdk_ws.GroupRequest `protobuf:"bytes,3,rep,name=groupRequestList" json:"groupRequestList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -445,7 +365,7 @@ func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplication func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListResp) ProtoMessage() {} func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{8} + return fileDescriptor_group_908b1d0f9beeddfc, []int{8} } func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b) @@ -465,11 +385,11 @@ func (m *GetGroupApplicationListResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupApplicationListResp proto.InternalMessageInfo -func (m *GetGroupApplicationListResp) GetCommonResp() *sdk_ws.CommonResp { +func (m *GetGroupApplicationListResp) GetTotal() int32 { if m != nil { - return m.CommonResp + return m.Total } - return nil + return 0 } func (m *GetGroupApplicationListResp) GetGroupRequestList() []*sdk_ws.GroupRequest { @@ -480,19 +400,18 @@ func (m *GetGroupApplicationListResp) GetGroupRequestList() []*sdk_ws.GroupReque } type GetUserReqApplicationListReq struct { - UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` - OpUserID string `protobuf:"bytes,2,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=pagination" json:"pagination,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetUserReqApplicationListReq) Reset() { *m = GetUserReqApplicationListReq{} } func (m *GetUserReqApplicationListReq) String() string { return proto.CompactTextString(m) } func (*GetUserReqApplicationListReq) ProtoMessage() {} func (*GetUserReqApplicationListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{9} + return fileDescriptor_group_908b1d0f9beeddfc, []int{9} } func (m *GetUserReqApplicationListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserReqApplicationListReq.Unmarshal(m, b) @@ -519,22 +438,15 @@ func (m *GetUserReqApplicationListReq) GetUserID() string { return "" } -func (m *GetUserReqApplicationListReq) GetOpUserID() string { +func (m *GetUserReqApplicationListReq) GetPagination() *sdk_ws.RequestPagination { if m != nil { - return m.OpUserID + return m.Pagination } - return "" -} - -func (m *GetUserReqApplicationListReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" + return nil } type GetUserReqApplicationListResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` + Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` GroupRequestList []*sdk_ws.GroupRequest `protobuf:"bytes,2,rep,name=groupRequestList" json:"groupRequestList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -545,7 +457,7 @@ func (m *GetUserReqApplicationListResp) Reset() { *m = GetUserReqApplica func (m *GetUserReqApplicationListResp) String() string { return proto.CompactTextString(m) } func (*GetUserReqApplicationListResp) ProtoMessage() {} func (*GetUserReqApplicationListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{10} + return fileDescriptor_group_908b1d0f9beeddfc, []int{10} } func (m *GetUserReqApplicationListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserReqApplicationListResp.Unmarshal(m, b) @@ -565,11 +477,11 @@ func (m *GetUserReqApplicationListResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetUserReqApplicationListResp proto.InternalMessageInfo -func (m *GetUserReqApplicationListResp) GetCommonResp() *sdk_ws.CommonResp { +func (m *GetUserReqApplicationListResp) GetTotal() int32 { if m != nil { - return m.CommonResp + return m.Total } - return nil + return 0 } func (m *GetUserReqApplicationListResp) GetGroupRequestList() []*sdk_ws.GroupRequest { @@ -583,8 +495,6 @@ type TransferGroupOwnerReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` OldOwnerUserID string `protobuf:"bytes,2,opt,name=oldOwnerUserID" json:"oldOwnerUserID,omitempty"` NewOwnerUserID string `protobuf:"bytes,3,opt,name=newOwnerUserID" json:"newOwnerUserID,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` - OpUserID string `protobuf:"bytes,5,opt,name=opUserID" json:"opUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -594,7 +504,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} } func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerReq) ProtoMessage() {} func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{11} + return fileDescriptor_group_908b1d0f9beeddfc, []int{11} } func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b) @@ -635,32 +545,17 @@ func (m *TransferGroupOwnerReq) GetNewOwnerUserID() string { return "" } -func (m *TransferGroupOwnerReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *TransferGroupOwnerReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - type TransferGroupOwnerResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *TransferGroupOwnerResp) Reset() { *m = TransferGroupOwnerResp{} } func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerResp) ProtoMessage() {} func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{12} + return fileDescriptor_group_908b1d0f9beeddfc, []int{12} } func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b) @@ -680,18 +575,9 @@ func (m *TransferGroupOwnerResp) XXX_DiscardUnknown() { var xxx_messageInfo_TransferGroupOwnerResp proto.InternalMessageInfo -func (m *TransferGroupOwnerResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type JoinGroupReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` ReqMessage string `protobuf:"bytes,2,opt,name=reqMessage" json:"reqMessage,omitempty"` - OpUserID string `protobuf:"bytes,3,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` JoinSource int32 `protobuf:"varint,5,opt,name=joinSource" json:"joinSource,omitempty"` InviterUserID string `protobuf:"bytes,6,opt,name=inviterUserID" json:"inviterUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -703,7 +589,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} } func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) } func (*JoinGroupReq) ProtoMessage() {} func (*JoinGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{13} + return fileDescriptor_group_908b1d0f9beeddfc, []int{13} } func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b) @@ -737,20 +623,6 @@ func (m *JoinGroupReq) GetReqMessage() string { return "" } -func (m *JoinGroupReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - -func (m *JoinGroupReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - func (m *JoinGroupReq) GetJoinSource() int32 { if m != nil { return m.JoinSource @@ -766,17 +638,16 @@ func (m *JoinGroupReq) GetInviterUserID() string { } type JoinGroupResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *JoinGroupResp) Reset() { *m = JoinGroupResp{} } func (m *JoinGroupResp) String() string { return proto.CompactTextString(m) } func (*JoinGroupResp) ProtoMessage() {} func (*JoinGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{14} + return fileDescriptor_group_908b1d0f9beeddfc, []int{14} } func (m *JoinGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupResp.Unmarshal(m, b) @@ -796,16 +667,7 @@ func (m *JoinGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_JoinGroupResp proto.InternalMessageInfo -func (m *JoinGroupResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type GroupApplicationResponseReq struct { - OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` - OpUserID string `protobuf:"bytes,2,opt,name=opUserID" json:"opUserID,omitempty"` GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` FromUserID string `protobuf:"bytes,4,opt,name=fromUserID" json:"fromUserID,omitempty"` HandledMsg string `protobuf:"bytes,5,opt,name=handledMsg" json:"handledMsg,omitempty"` @@ -819,7 +681,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseReq) ProtoMessage() {} func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{15} + return fileDescriptor_group_908b1d0f9beeddfc, []int{15} } func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b) @@ -839,20 +701,6 @@ func (m *GroupApplicationResponseReq) XXX_DiscardUnknown() { var xxx_messageInfo_GroupApplicationResponseReq proto.InternalMessageInfo -func (m *GroupApplicationResponseReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *GroupApplicationResponseReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - func (m *GroupApplicationResponseReq) GetGroupID() string { if m != nil { return m.GroupID @@ -882,17 +730,16 @@ func (m *GroupApplicationResponseReq) GetHandleResult() int32 { } type GroupApplicationResponseResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GroupApplicationResponseResp) Reset() { *m = GroupApplicationResponseResp{} } func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseResp) ProtoMessage() {} func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{16} + return fileDescriptor_group_908b1d0f9beeddfc, []int{16} } func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b) @@ -912,17 +759,8 @@ func (m *GroupApplicationResponseResp) XXX_DiscardUnknown() { var xxx_messageInfo_GroupApplicationResponseResp proto.InternalMessageInfo -func (m *GroupApplicationResponseResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type QuitGroupReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - OpUserID string `protobuf:"bytes,3,opt,name=opUserID" json:"opUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -932,7 +770,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} } func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) } func (*QuitGroupReq) ProtoMessage() {} func (*QuitGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{17} + return fileDescriptor_group_908b1d0f9beeddfc, []int{17} } func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b) @@ -959,32 +797,17 @@ func (m *QuitGroupReq) GetGroupID() string { return "" } -func (m *QuitGroupReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *QuitGroupReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - type QuitGroupResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *QuitGroupResp) Reset() { *m = QuitGroupResp{} } func (m *QuitGroupResp) String() string { return proto.CompactTextString(m) } func (*QuitGroupResp) ProtoMessage() {} func (*QuitGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{18} + return fileDescriptor_group_908b1d0f9beeddfc, []int{18} } func (m *QuitGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuitGroupResp.Unmarshal(m, b) @@ -1004,29 +827,20 @@ func (m *QuitGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_QuitGroupResp proto.InternalMessageInfo -func (m *QuitGroupResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type GetGroupMemberListReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - OpUserID string `protobuf:"bytes,2,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` - Filter int32 `protobuf:"varint,4,opt,name=filter" json:"filter,omitempty"` - NextSeq int32 `protobuf:"varint,5,opt,name=nextSeq" json:"nextSeq,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` + Filter int32 `protobuf:"varint,4,opt,name=filter" json:"filter,omitempty"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=pagination" json:"pagination,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} } func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListReq) ProtoMessage() {} func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{19} + return fileDescriptor_group_908b1d0f9beeddfc, []int{19} } func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b) @@ -1053,20 +867,6 @@ func (m *GetGroupMemberListReq) GetGroupID() string { return "" } -func (m *GetGroupMemberListReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - -func (m *GetGroupMemberListReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - func (m *GetGroupMemberListReq) GetFilter() int32 { if m != nil { return m.Filter @@ -1074,17 +874,16 @@ func (m *GetGroupMemberListReq) GetFilter() int32 { return 0 } -func (m *GetGroupMemberListReq) GetNextSeq() int32 { +func (m *GetGroupMemberListReq) GetPagination() *sdk_ws.RequestPagination { if m != nil { - return m.NextSeq + return m.Pagination } - return 0 + return nil } type GetGroupMemberListResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` + Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` MemberList []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` - NextSeq int32 `protobuf:"varint,4,opt,name=nextSeq" json:"nextSeq,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1094,7 +893,7 @@ func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{} func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListResp) ProtoMessage() {} func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{20} + return fileDescriptor_group_908b1d0f9beeddfc, []int{20} } func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b) @@ -1114,11 +913,11 @@ func (m *GetGroupMemberListResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupMemberListResp proto.InternalMessageInfo -func (m *GetGroupMemberListResp) GetCommonResp() *sdk_ws.CommonResp { +func (m *GetGroupMemberListResp) GetTotal() int32 { if m != nil { - return m.CommonResp + return m.Total } - return nil + return 0 } func (m *GetGroupMemberListResp) GetMemberList() []*sdk_ws.GroupMemberFullInfo { @@ -1128,18 +927,9 @@ func (m *GetGroupMemberListResp) GetMemberList() []*sdk_ws.GroupMemberFullInfo { return nil } -func (m *GetGroupMemberListResp) GetNextSeq() int32 { - if m != nil { - return m.NextSeq - } - return 0 -} - type GetGroupMembersInfoReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` MemberList []string `protobuf:"bytes,2,rep,name=memberList" json:"memberList,omitempty"` - OpUserID string `protobuf:"bytes,3,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1149,7 +939,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{} func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoReq) ProtoMessage() {} func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{21} + return fileDescriptor_group_908b1d0f9beeddfc, []int{21} } func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b) @@ -1183,22 +973,7 @@ func (m *GetGroupMembersInfoReq) GetMemberList() []string { return nil } -func (m *GetGroupMembersInfoReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - -func (m *GetGroupMembersInfoReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - type GetGroupMembersInfoResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` MemberList []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1209,7 +984,7 @@ func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoResp) ProtoMessage() {} func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{22} + return fileDescriptor_group_908b1d0f9beeddfc, []int{22} } func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b) @@ -1229,13 +1004,6 @@ func (m *GetGroupMembersInfoResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupMembersInfoResp proto.InternalMessageInfo -func (m *GetGroupMembersInfoResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - func (m *GetGroupMembersInfoResp) GetMemberList() []*sdk_ws.GroupMemberFullInfo { if m != nil { return m.MemberList @@ -1247,8 +1015,6 @@ type KickGroupMemberReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` KickedUserIDList []string `protobuf:"bytes,2,rep,name=kickedUserIDList" json:"kickedUserIDList,omitempty"` Reason string `protobuf:"bytes,3,opt,name=reason" json:"reason,omitempty"` - OperationID string `protobuf:"bytes,5,opt,name=operationID" json:"operationID,omitempty"` - OpUserID string `protobuf:"bytes,6,opt,name=opUserID" json:"opUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1258,7 +1024,7 @@ func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} } func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberReq) ProtoMessage() {} func (*KickGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{23} + return fileDescriptor_group_908b1d0f9beeddfc, []int{23} } func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b) @@ -1299,20 +1065,6 @@ func (m *KickGroupMemberReq) GetReason() string { return "" } -func (m *KickGroupMemberReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *KickGroupMemberReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - type Id2Result struct { UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` Result int32 `protobuf:"varint,2,opt,name=result" json:"result,omitempty"` @@ -1325,7 +1077,7 @@ func (m *Id2Result) Reset() { *m = Id2Result{} } func (m *Id2Result) String() string { return proto.CompactTextString(m) } func (*Id2Result) ProtoMessage() {} func (*Id2Result) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{24} + return fileDescriptor_group_908b1d0f9beeddfc, []int{24} } func (m *Id2Result) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Id2Result.Unmarshal(m, b) @@ -1360,18 +1112,17 @@ func (m *Id2Result) GetResult() int32 { } type KickGroupMemberResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - Id2ResultList []*Id2Result `protobuf:"bytes,3,rep,name=id2ResultList" json:"id2ResultList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Id2ResultList []*Id2Result `protobuf:"bytes,3,rep,name=id2ResultList" json:"id2ResultList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} } func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberResp) ProtoMessage() {} func (*KickGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{25} + return fileDescriptor_group_908b1d0f9beeddfc, []int{25} } func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b) @@ -1391,13 +1142,6 @@ func (m *KickGroupMemberResp) XXX_DiscardUnknown() { var xxx_messageInfo_KickGroupMemberResp proto.InternalMessageInfo -func (m *KickGroupMemberResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - func (m *KickGroupMemberResp) GetId2ResultList() []*Id2Result { if m != nil { return m.Id2ResultList @@ -1406,19 +1150,18 @@ func (m *KickGroupMemberResp) GetId2ResultList() []*Id2Result { } type GetJoinedGroupListReq struct { - FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - OpUserID string `protobuf:"bytes,3,opt,name=opUserID" json:"opUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=pagination" json:"pagination,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} } func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListReq) ProtoMessage() {} func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{26} + return fileDescriptor_group_908b1d0f9beeddfc, []int{26} } func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b) @@ -1445,22 +1188,15 @@ func (m *GetJoinedGroupListReq) GetFromUserID() string { return "" } -func (m *GetJoinedGroupListReq) GetOperationID() string { +func (m *GetJoinedGroupListReq) GetPagination() *sdk_ws.RequestPagination { if m != nil { - return m.OperationID + return m.Pagination } - return "" -} - -func (m *GetJoinedGroupListReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" + return nil } type GetJoinedGroupListResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` + Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` GroupList []*sdk_ws.GroupInfo `protobuf:"bytes,3,rep,name=groupList" json:"groupList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1471,7 +1207,7 @@ func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{} func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListResp) ProtoMessage() {} func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{27} + return fileDescriptor_group_908b1d0f9beeddfc, []int{27} } func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b) @@ -1491,11 +1227,11 @@ func (m *GetJoinedGroupListResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetJoinedGroupListResp proto.InternalMessageInfo -func (m *GetJoinedGroupListResp) GetCommonResp() *sdk_ws.CommonResp { +func (m *GetJoinedGroupListResp) GetTotal() int32 { if m != nil { - return m.CommonResp + return m.Total } - return nil + return 0 } func (m *GetJoinedGroupListResp) GetGroupList() []*sdk_ws.GroupInfo { @@ -1506,11 +1242,9 @@ func (m *GetJoinedGroupListResp) GetGroupList() []*sdk_ws.GroupInfo { } type InviteUserToGroupReq struct { - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` Reason string `protobuf:"bytes,4,opt,name=reason" json:"reason,omitempty"` InvitedUserIDList []string `protobuf:"bytes,5,rep,name=invitedUserIDList" json:"invitedUserIDList,omitempty"` - OpUserID string `protobuf:"bytes,6,opt,name=opUserID" json:"opUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1520,7 +1254,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} } func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupReq) ProtoMessage() {} func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{28} + return fileDescriptor_group_908b1d0f9beeddfc, []int{28} } func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b) @@ -1540,13 +1274,6 @@ func (m *InviteUserToGroupReq) XXX_DiscardUnknown() { var xxx_messageInfo_InviteUserToGroupReq proto.InternalMessageInfo -func (m *InviteUserToGroupReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - func (m *InviteUserToGroupReq) GetGroupID() string { if m != nil { return m.GroupID @@ -1568,26 +1295,18 @@ func (m *InviteUserToGroupReq) GetInvitedUserIDList() []string { return nil } -func (m *InviteUserToGroupReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - type InviteUserToGroupResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - Id2ResultList []*Id2Result `protobuf:"bytes,3,rep,name=id2ResultList" json:"id2ResultList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Id2ResultList []*Id2Result `protobuf:"bytes,3,rep,name=id2ResultList" json:"id2ResultList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} } func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupResp) ProtoMessage() {} func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{29} + return fileDescriptor_group_908b1d0f9beeddfc, []int{29} } func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b) @@ -1607,13 +1326,6 @@ func (m *InviteUserToGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_InviteUserToGroupResp proto.InternalMessageInfo -func (m *InviteUserToGroupResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - func (m *InviteUserToGroupResp) GetId2ResultList() []*Id2Result { if m != nil { return m.Id2ResultList @@ -1623,8 +1335,6 @@ func (m *InviteUserToGroupResp) GetId2ResultList() []*Id2Result { type GetGroupAllMemberReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - OpUserID string `protobuf:"bytes,2,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` Offset int32 `protobuf:"varint,4,opt,name=offset" json:"offset,omitempty"` Count int32 `protobuf:"varint,5,opt,name=count" json:"count,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1636,7 +1346,7 @@ func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} } func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberReq) ProtoMessage() {} func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{30} + return fileDescriptor_group_908b1d0f9beeddfc, []int{30} } func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b) @@ -1663,20 +1373,6 @@ func (m *GetGroupAllMemberReq) GetGroupID() string { return "" } -func (m *GetGroupAllMemberReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - -func (m *GetGroupAllMemberReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - func (m *GetGroupAllMemberReq) GetOffset() int32 { if m != nil { return m.Offset @@ -1692,7 +1388,6 @@ func (m *GetGroupAllMemberReq) GetCount() int32 { } type GetGroupAllMemberResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` MemberList []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1703,7 +1398,7 @@ func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} } func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberResp) ProtoMessage() {} func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{31} + return fileDescriptor_group_908b1d0f9beeddfc, []int{31} } func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b) @@ -1723,13 +1418,6 @@ func (m *GetGroupAllMemberResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupAllMemberResp proto.InternalMessageInfo -func (m *GetGroupAllMemberResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - func (m *GetGroupAllMemberResp) GetMemberList() []*sdk_ws.GroupMemberFullInfo { if m != nil { return m.MemberList @@ -1750,7 +1438,7 @@ func (m *CMSGroup) Reset() { *m = CMSGroup{} } func (m *CMSGroup) String() string { return proto.CompactTextString(m) } func (*CMSGroup) ProtoMessage() {} func (*CMSGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{32} + return fileDescriptor_group_908b1d0f9beeddfc, []int{32} } func (m *CMSGroup) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CMSGroup.Unmarshal(m, b) @@ -1795,7 +1483,6 @@ type GetGroupsReq struct { Pagination *sdk_ws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` GroupName string `protobuf:"bytes,2,opt,name=groupName" json:"groupName,omitempty"` GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1805,7 +1492,7 @@ func (m *GetGroupsReq) Reset() { *m = GetGroupsReq{} } func (m *GetGroupsReq) String() string { return proto.CompactTextString(m) } func (*GetGroupsReq) ProtoMessage() {} func (*GetGroupsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{33} + return fileDescriptor_group_908b1d0f9beeddfc, []int{33} } func (m *GetGroupsReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsReq.Unmarshal(m, b) @@ -1846,28 +1533,19 @@ func (m *GetGroupsReq) GetGroupID() string { return "" } -func (m *GetGroupsReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - type GetGroupsResp struct { - Groups []*CMSGroup `protobuf:"bytes,1,rep,name=groups" json:"groups,omitempty"` - Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,2,opt,name=pagination" json:"pagination,omitempty"` - GroupNum int32 `protobuf:"varint,3,opt,name=GroupNum" json:"GroupNum,omitempty"` - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,4,opt,name=commonResp" json:"commonResp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Groups []*CMSGroup `protobuf:"bytes,1,rep,name=groups" json:"groups,omitempty"` + GroupNum int32 `protobuf:"varint,3,opt,name=GroupNum" json:"GroupNum,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetGroupsResp) Reset() { *m = GetGroupsResp{} } func (m *GetGroupsResp) String() string { return proto.CompactTextString(m) } func (*GetGroupsResp) ProtoMessage() {} func (*GetGroupsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{34} + return fileDescriptor_group_908b1d0f9beeddfc, []int{34} } func (m *GetGroupsResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsResp.Unmarshal(m, b) @@ -1894,13 +1572,6 @@ func (m *GetGroupsResp) GetGroups() []*CMSGroup { return nil } -func (m *GetGroupsResp) GetPagination() *sdk_ws.ResponsePagination { - if m != nil { - return m.Pagination - } - return nil -} - func (m *GetGroupsResp) GetGroupNum() int32 { if m != nil { return m.GroupNum @@ -1908,16 +1579,8 @@ func (m *GetGroupsResp) GetGroupNum() int32 { return 0 } -func (m *GetGroupsResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type GetGroupMemberReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1927,7 +1590,7 @@ func (m *GetGroupMemberReq) Reset() { *m = GetGroupMemberReq{} } func (m *GetGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberReq) ProtoMessage() {} func (*GetGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{35} + return fileDescriptor_group_908b1d0f9beeddfc, []int{35} } func (m *GetGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberReq.Unmarshal(m, b) @@ -1954,18 +1617,10 @@ func (m *GetGroupMemberReq) GetGroupID() string { return "" } -func (m *GetGroupMemberReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - type GetGroupMembersCMSReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` UserName string `protobuf:"bytes,2,opt,name=userName" json:"userName,omitempty"` Pagination *sdk_ws.RequestPagination `protobuf:"bytes,3,opt,name=pagination" json:"pagination,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1975,7 +1630,7 @@ func (m *GetGroupMembersCMSReq) Reset() { *m = GetGroupMembersCMSReq{} } func (m *GetGroupMembersCMSReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersCMSReq) ProtoMessage() {} func (*GetGroupMembersCMSReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{36} + return fileDescriptor_group_908b1d0f9beeddfc, []int{36} } func (m *GetGroupMembersCMSReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersCMSReq.Unmarshal(m, b) @@ -2016,18 +1671,10 @@ func (m *GetGroupMembersCMSReq) GetPagination() *sdk_ws.RequestPagination { return nil } -func (m *GetGroupMembersCMSReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - type GetGroupMembersCMSResp struct { Members []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members" json:"members,omitempty"` Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,2,opt,name=pagination" json:"pagination,omitempty"` MemberNums int32 `protobuf:"varint,3,opt,name=memberNums" json:"memberNums,omitempty"` - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,4,opt,name=commonResp" json:"commonResp,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2037,7 +1684,7 @@ func (m *GetGroupMembersCMSResp) Reset() { *m = GetGroupMembersCMSResp{} func (m *GetGroupMembersCMSResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersCMSResp) ProtoMessage() {} func (*GetGroupMembersCMSResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{37} + return fileDescriptor_group_908b1d0f9beeddfc, []int{37} } func (m *GetGroupMembersCMSResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersCMSResp.Unmarshal(m, b) @@ -2078,16 +1725,7 @@ func (m *GetGroupMembersCMSResp) GetMemberNums() int32 { return 0 } -func (m *GetGroupMembersCMSResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type DismissGroupReq struct { - OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2098,7 +1736,7 @@ func (m *DismissGroupReq) Reset() { *m = DismissGroupReq{} } func (m *DismissGroupReq) String() string { return proto.CompactTextString(m) } func (*DismissGroupReq) ProtoMessage() {} func (*DismissGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{38} + return fileDescriptor_group_908b1d0f9beeddfc, []int{38} } func (m *DismissGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DismissGroupReq.Unmarshal(m, b) @@ -2118,20 +1756,6 @@ func (m *DismissGroupReq) XXX_DiscardUnknown() { var xxx_messageInfo_DismissGroupReq proto.InternalMessageInfo -func (m *DismissGroupReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - -func (m *DismissGroupReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - func (m *DismissGroupReq) GetGroupID() string { if m != nil { return m.GroupID @@ -2140,17 +1764,16 @@ func (m *DismissGroupReq) GetGroupID() string { } type DismissGroupResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *DismissGroupResp) Reset() { *m = DismissGroupResp{} } func (m *DismissGroupResp) String() string { return proto.CompactTextString(m) } func (*DismissGroupResp) ProtoMessage() {} func (*DismissGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{39} + return fileDescriptor_group_908b1d0f9beeddfc, []int{39} } func (m *DismissGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DismissGroupResp.Unmarshal(m, b) @@ -2170,16 +1793,7 @@ func (m *DismissGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_DismissGroupResp proto.InternalMessageInfo -func (m *DismissGroupResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type MuteGroupMemberReq struct { - OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` UserID string `protobuf:"bytes,4,opt,name=userID" json:"userID,omitempty"` MutedSeconds uint32 `protobuf:"varint,5,opt,name=mutedSeconds" json:"mutedSeconds,omitempty"` @@ -2192,7 +1806,7 @@ func (m *MuteGroupMemberReq) Reset() { *m = MuteGroupMemberReq{} } func (m *MuteGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*MuteGroupMemberReq) ProtoMessage() {} func (*MuteGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{40} + return fileDescriptor_group_908b1d0f9beeddfc, []int{40} } func (m *MuteGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MuteGroupMemberReq.Unmarshal(m, b) @@ -2212,20 +1826,6 @@ func (m *MuteGroupMemberReq) XXX_DiscardUnknown() { var xxx_messageInfo_MuteGroupMemberReq proto.InternalMessageInfo -func (m *MuteGroupMemberReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - -func (m *MuteGroupMemberReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - func (m *MuteGroupMemberReq) GetGroupID() string { if m != nil { return m.GroupID @@ -2248,17 +1848,16 @@ func (m *MuteGroupMemberReq) GetMutedSeconds() uint32 { } type MuteGroupMemberResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MuteGroupMemberResp) Reset() { *m = MuteGroupMemberResp{} } func (m *MuteGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*MuteGroupMemberResp) ProtoMessage() {} func (*MuteGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{41} + return fileDescriptor_group_908b1d0f9beeddfc, []int{41} } func (m *MuteGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MuteGroupMemberResp.Unmarshal(m, b) @@ -2278,16 +1877,7 @@ func (m *MuteGroupMemberResp) XXX_DiscardUnknown() { var xxx_messageInfo_MuteGroupMemberResp proto.InternalMessageInfo -func (m *MuteGroupMemberResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type CancelMuteGroupMemberReq struct { - OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` UserID string `protobuf:"bytes,4,opt,name=userID" json:"userID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -2299,7 +1889,7 @@ func (m *CancelMuteGroupMemberReq) Reset() { *m = CancelMuteGroupMemberR func (m *CancelMuteGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupMemberReq) ProtoMessage() {} func (*CancelMuteGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{42} + return fileDescriptor_group_908b1d0f9beeddfc, []int{42} } func (m *CancelMuteGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CancelMuteGroupMemberReq.Unmarshal(m, b) @@ -2319,20 +1909,6 @@ func (m *CancelMuteGroupMemberReq) XXX_DiscardUnknown() { var xxx_messageInfo_CancelMuteGroupMemberReq proto.InternalMessageInfo -func (m *CancelMuteGroupMemberReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - -func (m *CancelMuteGroupMemberReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - func (m *CancelMuteGroupMemberReq) GetGroupID() string { if m != nil { return m.GroupID @@ -2348,17 +1924,16 @@ func (m *CancelMuteGroupMemberReq) GetUserID() string { } type CancelMuteGroupMemberResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CancelMuteGroupMemberResp) Reset() { *m = CancelMuteGroupMemberResp{} } func (m *CancelMuteGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupMemberResp) ProtoMessage() {} func (*CancelMuteGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{43} + return fileDescriptor_group_908b1d0f9beeddfc, []int{43} } func (m *CancelMuteGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CancelMuteGroupMemberResp.Unmarshal(m, b) @@ -2378,16 +1953,7 @@ func (m *CancelMuteGroupMemberResp) XXX_DiscardUnknown() { var xxx_messageInfo_CancelMuteGroupMemberResp proto.InternalMessageInfo -func (m *CancelMuteGroupMemberResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type MuteGroupReq struct { - OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2398,7 +1964,7 @@ func (m *MuteGroupReq) Reset() { *m = MuteGroupReq{} } func (m *MuteGroupReq) String() string { return proto.CompactTextString(m) } func (*MuteGroupReq) ProtoMessage() {} func (*MuteGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{44} + return fileDescriptor_group_908b1d0f9beeddfc, []int{44} } func (m *MuteGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MuteGroupReq.Unmarshal(m, b) @@ -2418,20 +1984,6 @@ func (m *MuteGroupReq) XXX_DiscardUnknown() { var xxx_messageInfo_MuteGroupReq proto.InternalMessageInfo -func (m *MuteGroupReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - -func (m *MuteGroupReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - func (m *MuteGroupReq) GetGroupID() string { if m != nil { return m.GroupID @@ -2440,17 +1992,16 @@ func (m *MuteGroupReq) GetGroupID() string { } type MuteGroupResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MuteGroupResp) Reset() { *m = MuteGroupResp{} } func (m *MuteGroupResp) String() string { return proto.CompactTextString(m) } func (*MuteGroupResp) ProtoMessage() {} func (*MuteGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{45} + return fileDescriptor_group_908b1d0f9beeddfc, []int{45} } func (m *MuteGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MuteGroupResp.Unmarshal(m, b) @@ -2470,16 +2021,7 @@ func (m *MuteGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_MuteGroupResp proto.InternalMessageInfo -func (m *MuteGroupResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type CancelMuteGroupReq struct { - OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2490,7 +2032,7 @@ func (m *CancelMuteGroupReq) Reset() { *m = CancelMuteGroupReq{} } func (m *CancelMuteGroupReq) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupReq) ProtoMessage() {} func (*CancelMuteGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{46} + return fileDescriptor_group_908b1d0f9beeddfc, []int{46} } func (m *CancelMuteGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CancelMuteGroupReq.Unmarshal(m, b) @@ -2510,20 +2052,6 @@ func (m *CancelMuteGroupReq) XXX_DiscardUnknown() { var xxx_messageInfo_CancelMuteGroupReq proto.InternalMessageInfo -func (m *CancelMuteGroupReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - -func (m *CancelMuteGroupReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - func (m *CancelMuteGroupReq) GetGroupID() string { if m != nil { return m.GroupID @@ -2532,17 +2060,16 @@ func (m *CancelMuteGroupReq) GetGroupID() string { } type CancelMuteGroupResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CancelMuteGroupResp) Reset() { *m = CancelMuteGroupResp{} } func (m *CancelMuteGroupResp) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupResp) ProtoMessage() {} func (*CancelMuteGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{47} + return fileDescriptor_group_908b1d0f9beeddfc, []int{47} } func (m *CancelMuteGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CancelMuteGroupResp.Unmarshal(m, b) @@ -2562,18 +2089,9 @@ func (m *CancelMuteGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_CancelMuteGroupResp proto.InternalMessageInfo -func (m *CancelMuteGroupResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type SetGroupMemberNicknameReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` Nickname string `protobuf:"bytes,2,opt,name=nickname" json:"nickname,omitempty"` - OpUserID string `protobuf:"bytes,3,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` UserID string `protobuf:"bytes,5,opt,name=userID" json:"userID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2584,7 +2102,7 @@ func (m *SetGroupMemberNicknameReq) Reset() { *m = SetGroupMemberNicknam func (m *SetGroupMemberNicknameReq) String() string { return proto.CompactTextString(m) } func (*SetGroupMemberNicknameReq) ProtoMessage() {} func (*SetGroupMemberNicknameReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{48} + return fileDescriptor_group_908b1d0f9beeddfc, []int{48} } func (m *SetGroupMemberNicknameReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupMemberNicknameReq.Unmarshal(m, b) @@ -2618,20 +2136,6 @@ func (m *SetGroupMemberNicknameReq) GetNickname() string { return "" } -func (m *SetGroupMemberNicknameReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - -func (m *SetGroupMemberNicknameReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - func (m *SetGroupMemberNicknameReq) GetUserID() string { if m != nil { return m.UserID @@ -2640,17 +2144,16 @@ func (m *SetGroupMemberNicknameReq) GetUserID() string { } type SetGroupMemberNicknameResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *SetGroupMemberNicknameResp) Reset() { *m = SetGroupMemberNicknameResp{} } func (m *SetGroupMemberNicknameResp) String() string { return proto.CompactTextString(m) } func (*SetGroupMemberNicknameResp) ProtoMessage() {} func (*SetGroupMemberNicknameResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{49} + return fileDescriptor_group_908b1d0f9beeddfc, []int{49} } func (m *SetGroupMemberNicknameResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupMemberNicknameResp.Unmarshal(m, b) @@ -2670,27 +2173,19 @@ func (m *SetGroupMemberNicknameResp) XXX_DiscardUnknown() { var xxx_messageInfo_SetGroupMemberNicknameResp proto.InternalMessageInfo -func (m *SetGroupMemberNicknameResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type GetJoinedSuperGroupListReq struct { - OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` - UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` - OpUserID string `protobuf:"bytes,3,opt,name=opUserID" json:"opUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetJoinedSuperGroupListReq) Reset() { *m = GetJoinedSuperGroupListReq{} } func (m *GetJoinedSuperGroupListReq) String() string { return proto.CompactTextString(m) } func (*GetJoinedSuperGroupListReq) ProtoMessage() {} func (*GetJoinedSuperGroupListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{50} + return fileDescriptor_group_908b1d0f9beeddfc, []int{50} } func (m *GetJoinedSuperGroupListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedSuperGroupListReq.Unmarshal(m, b) @@ -2710,11 +2205,11 @@ func (m *GetJoinedSuperGroupListReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetJoinedSuperGroupListReq proto.InternalMessageInfo -func (m *GetJoinedSuperGroupListReq) GetOperationID() string { +func (m *GetJoinedSuperGroupListReq) GetPagination() *sdk_ws.RequestPagination { if m != nil { - return m.OperationID + return m.Pagination } - return "" + return nil } func (m *GetJoinedSuperGroupListReq) GetUserID() string { @@ -2724,15 +2219,8 @@ func (m *GetJoinedSuperGroupListReq) GetUserID() string { return "" } -func (m *GetJoinedSuperGroupListReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - type GetJoinedSuperGroupListResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` + Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` GroupList []*sdk_ws.GroupInfo `protobuf:"bytes,3,rep,name=groupList" json:"groupList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2743,7 +2231,7 @@ func (m *GetJoinedSuperGroupListResp) Reset() { *m = GetJoinedSuperGroup func (m *GetJoinedSuperGroupListResp) String() string { return proto.CompactTextString(m) } func (*GetJoinedSuperGroupListResp) ProtoMessage() {} func (*GetJoinedSuperGroupListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{51} + return fileDescriptor_group_908b1d0f9beeddfc, []int{51} } func (m *GetJoinedSuperGroupListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedSuperGroupListResp.Unmarshal(m, b) @@ -2763,11 +2251,11 @@ func (m *GetJoinedSuperGroupListResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetJoinedSuperGroupListResp proto.InternalMessageInfo -func (m *GetJoinedSuperGroupListResp) GetCommonResp() *sdk_ws.CommonResp { +func (m *GetJoinedSuperGroupListResp) GetTotal() int32 { if m != nil { - return m.CommonResp + return m.Total } - return nil + return 0 } func (m *GetJoinedSuperGroupListResp) GetGroupList() []*sdk_ws.GroupInfo { @@ -2779,8 +2267,6 @@ func (m *GetJoinedSuperGroupListResp) GetGroupList() []*sdk_ws.GroupInfo { type GetSuperGroupsInfoReq struct { GroupIDList []string `protobuf:"bytes,1,rep,name=groupIDList" json:"groupIDList,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - OpUserID string `protobuf:"bytes,3,opt,name=opUserID" json:"opUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2790,7 +2276,7 @@ func (m *GetSuperGroupsInfoReq) Reset() { *m = GetSuperGroupsInfoReq{} } func (m *GetSuperGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetSuperGroupsInfoReq) ProtoMessage() {} func (*GetSuperGroupsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{52} + return fileDescriptor_group_908b1d0f9beeddfc, []int{52} } func (m *GetSuperGroupsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSuperGroupsInfoReq.Unmarshal(m, b) @@ -2817,22 +2303,7 @@ func (m *GetSuperGroupsInfoReq) GetGroupIDList() []string { return nil } -func (m *GetSuperGroupsInfoReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *GetSuperGroupsInfoReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - type GetSuperGroupsInfoResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` GroupInfoList []*sdk_ws.GroupInfo `protobuf:"bytes,3,rep,name=groupInfoList" json:"groupInfoList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2843,7 +2314,7 @@ func (m *GetSuperGroupsInfoResp) Reset() { *m = GetSuperGroupsInfoResp{} func (m *GetSuperGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (*GetSuperGroupsInfoResp) ProtoMessage() {} func (*GetSuperGroupsInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{53} + return fileDescriptor_group_908b1d0f9beeddfc, []int{53} } func (m *GetSuperGroupsInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSuperGroupsInfoResp.Unmarshal(m, b) @@ -2863,13 +2334,6 @@ func (m *GetSuperGroupsInfoResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetSuperGroupsInfoResp proto.InternalMessageInfo -func (m *GetSuperGroupsInfoResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - func (m *GetSuperGroupsInfoResp) GetGroupInfoList() []*sdk_ws.GroupInfo { if m != nil { return m.GroupInfoList @@ -2880,8 +2344,6 @@ func (m *GetSuperGroupsInfoResp) GetGroupInfoList() []*sdk_ws.GroupInfo { type SetGroupMemberInfoReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` - OpUserID string `protobuf:"bytes,3,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` Nickname *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=nickname" json:"nickname,omitempty"` FaceURL *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=faceURL" json:"faceURL,omitempty"` RoleLevel *wrapperspb.Int32Value `protobuf:"bytes,7,opt,name=roleLevel" json:"roleLevel,omitempty"` @@ -2895,7 +2357,7 @@ func (m *SetGroupMemberInfoReq) Reset() { *m = SetGroupMemberInfoReq{} } func (m *SetGroupMemberInfoReq) String() string { return proto.CompactTextString(m) } func (*SetGroupMemberInfoReq) ProtoMessage() {} func (*SetGroupMemberInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{54} + return fileDescriptor_group_908b1d0f9beeddfc, []int{54} } func (m *SetGroupMemberInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupMemberInfoReq.Unmarshal(m, b) @@ -2929,20 +2391,6 @@ func (m *SetGroupMemberInfoReq) GetUserID() string { return "" } -func (m *SetGroupMemberInfoReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - -func (m *SetGroupMemberInfoReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - func (m *SetGroupMemberInfoReq) GetNickname() *wrapperspb.StringValue { if m != nil { return m.Nickname @@ -2972,17 +2420,16 @@ func (m *SetGroupMemberInfoReq) GetEx() *wrapperspb.StringValue { } type SetGroupMemberInfoResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *SetGroupMemberInfoResp) Reset() { *m = SetGroupMemberInfoResp{} } func (m *SetGroupMemberInfoResp) String() string { return proto.CompactTextString(m) } func (*SetGroupMemberInfoResp) ProtoMessage() {} func (*SetGroupMemberInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{55} + return fileDescriptor_group_908b1d0f9beeddfc, []int{55} } func (m *SetGroupMemberInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupMemberInfoResp.Unmarshal(m, b) @@ -3002,17 +2449,8 @@ func (m *SetGroupMemberInfoResp) XXX_DiscardUnknown() { var xxx_messageInfo_SetGroupMemberInfoResp proto.InternalMessageInfo -func (m *SetGroupMemberInfoResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type GetGroupAbstractInfoReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - OpUserID string `protobuf:"bytes,2,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` + GroupIDs []string `protobuf:"bytes,1,rep,name=groupIDs" json:"groupIDs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -3022,7 +2460,7 @@ func (m *GetGroupAbstractInfoReq) Reset() { *m = GetGroupAbstractInfoReq func (m *GetGroupAbstractInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupAbstractInfoReq) ProtoMessage() {} func (*GetGroupAbstractInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{56} + return fileDescriptor_group_908b1d0f9beeddfc, []int{56} } func (m *GetGroupAbstractInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAbstractInfoReq.Unmarshal(m, b) @@ -3042,41 +2480,79 @@ func (m *GetGroupAbstractInfoReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupAbstractInfoReq proto.InternalMessageInfo -func (m *GetGroupAbstractInfoReq) GetGroupID() string { +func (m *GetGroupAbstractInfoReq) GetGroupIDs() []string { + if m != nil { + return m.GroupIDs + } + return nil +} + +type GroupAbstractInfo struct { + GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` + GroupMemberNumber int32 `protobuf:"varint,2,opt,name=groupMemberNumber" json:"groupMemberNumber,omitempty"` + GroupMemberListHash uint64 `protobuf:"varint,3,opt,name=groupMemberListHash" json:"groupMemberListHash,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupAbstractInfo) Reset() { *m = GroupAbstractInfo{} } +func (m *GroupAbstractInfo) String() string { return proto.CompactTextString(m) } +func (*GroupAbstractInfo) ProtoMessage() {} +func (*GroupAbstractInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_group_908b1d0f9beeddfc, []int{57} +} +func (m *GroupAbstractInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupAbstractInfo.Unmarshal(m, b) +} +func (m *GroupAbstractInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupAbstractInfo.Marshal(b, m, deterministic) +} +func (dst *GroupAbstractInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupAbstractInfo.Merge(dst, src) +} +func (m *GroupAbstractInfo) XXX_Size() int { + return xxx_messageInfo_GroupAbstractInfo.Size(m) +} +func (m *GroupAbstractInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GroupAbstractInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupAbstractInfo proto.InternalMessageInfo + +func (m *GroupAbstractInfo) GetGroupID() string { if m != nil { return m.GroupID } return "" } -func (m *GetGroupAbstractInfoReq) GetOpUserID() string { +func (m *GroupAbstractInfo) GetGroupMemberNumber() int32 { if m != nil { - return m.OpUserID + return m.GroupMemberNumber } - return "" + return 0 } -func (m *GetGroupAbstractInfoReq) GetOperationID() string { +func (m *GroupAbstractInfo) GetGroupMemberListHash() uint64 { if m != nil { - return m.OperationID + return m.GroupMemberListHash } - return "" + return 0 } type GetGroupAbstractInfoResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - GroupMemberNumber int32 `protobuf:"varint,2,opt,name=groupMemberNumber" json:"groupMemberNumber,omitempty"` - GroupMemberListHash uint64 `protobuf:"varint,3,opt,name=groupMemberListHash" json:"groupMemberListHash,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupAbstractInfos []*GroupAbstractInfo `protobuf:"bytes,1,rep,name=groupAbstractInfos" json:"groupAbstractInfos,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetGroupAbstractInfoResp) Reset() { *m = GetGroupAbstractInfoResp{} } func (m *GetGroupAbstractInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupAbstractInfoResp) ProtoMessage() {} func (*GetGroupAbstractInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c3e6f244ba2c79e, []int{57} + return fileDescriptor_group_908b1d0f9beeddfc, []int{58} } func (m *GetGroupAbstractInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAbstractInfoResp.Unmarshal(m, b) @@ -3096,27 +2572,13 @@ func (m *GetGroupAbstractInfoResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupAbstractInfoResp proto.InternalMessageInfo -func (m *GetGroupAbstractInfoResp) GetCommonResp() *sdk_ws.CommonResp { +func (m *GetGroupAbstractInfoResp) GetGroupAbstractInfos() []*GroupAbstractInfo { if m != nil { - return m.CommonResp + return m.GroupAbstractInfos } return nil } -func (m *GetGroupAbstractInfoResp) GetGroupMemberNumber() int32 { - if m != nil { - return m.GroupMemberNumber - } - return 0 -} - -func (m *GetGroupAbstractInfoResp) GetGroupMemberListHash() uint64 { - if m != nil { - return m.GroupMemberListHash - } - return 0 -} - func init() { proto.RegisterType((*GroupAddMemberInfo)(nil), "group.GroupAddMemberInfo") proto.RegisterType((*CreateGroupReq)(nil), "group.CreateGroupReq") @@ -3175,6 +2637,7 @@ func init() { proto.RegisterType((*SetGroupMemberInfoReq)(nil), "group.SetGroupMemberInfoReq") proto.RegisterType((*SetGroupMemberInfoResp)(nil), "group.SetGroupMemberInfoResp") proto.RegisterType((*GetGroupAbstractInfoReq)(nil), "group.GetGroupAbstractInfoReq") + proto.RegisterType((*GroupAbstractInfo)(nil), "group.GroupAbstractInfo") proto.RegisterType((*GetGroupAbstractInfoResp)(nil), "group.GetGroupAbstractInfoResp") } @@ -3189,32 +2652,55 @@ const _ = grpc.SupportPackageIsVersion4 // Client API for Group service type GroupClient interface { + // 创建群 CreateGroup(ctx context.Context, in *CreateGroupReq, opts ...grpc.CallOption) (*CreateGroupResp, error) + // 申请加群 JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...grpc.CallOption) (*JoinGroupResp, error) + // 退出群 QuitGroup(ctx context.Context, in *QuitGroupReq, opts ...grpc.CallOption) (*QuitGroupResp, error) + // 获取指定群信息 GetGroupsInfo(ctx context.Context, in *GetGroupsInfoReq, opts ...grpc.CallOption) (*GetGroupsInfoResp, error) + // 设置群信息 SetGroupInfo(ctx context.Context, in *SetGroupInfoReq, opts ...grpc.CallOption) (*SetGroupInfoResp, error) + // (以管理员或群主身份)获取群的加群申请 GetGroupApplicationList(ctx context.Context, in *GetGroupApplicationListReq, opts ...grpc.CallOption) (*GetGroupApplicationListResp, error) + // 获取用户自己的主动加群申请 GetUserReqApplicationList(ctx context.Context, in *GetUserReqApplicationListReq, opts ...grpc.CallOption) (*GetUserReqApplicationListResp, error) + // 转让群主 TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*TransferGroupOwnerResp, error) + // 群主或管理员处理进群申请 GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*GroupApplicationResponseResp, error) + // 获取某个群的群成员 GetGroupMemberList(ctx context.Context, in *GetGroupMemberListReq, opts ...grpc.CallOption) (*GetGroupMemberListResp, error) + // 获取某个群的指定群成员 GetGroupMembersInfo(ctx context.Context, in *GetGroupMembersInfoReq, opts ...grpc.CallOption) (*GetGroupMembersInfoResp, error) + // 踢出群 KickGroupMember(ctx context.Context, in *KickGroupMemberReq, opts ...grpc.CallOption) (*KickGroupMemberResp, error) + // 获取某个人已加入群 GetJoinedGroupList(ctx context.Context, in *GetJoinedGroupListReq, opts ...grpc.CallOption) (*GetJoinedGroupListResp, error) + // 邀请某些人进群 InviteUserToGroup(ctx context.Context, in *InviteUserToGroupReq, opts ...grpc.CallOption) (*InviteUserToGroupResp, error) - GetGroupAllMember(ctx context.Context, in *GetGroupAllMemberReq, opts ...grpc.CallOption) (*GetGroupAllMemberResp, error) GetGroups(ctx context.Context, in *GetGroupsReq, opts ...grpc.CallOption) (*GetGroupsResp, error) GetGroupMembersCMS(ctx context.Context, in *GetGroupMembersCMSReq, opts ...grpc.CallOption) (*GetGroupMembersCMSResp, error) + // 解散群 DismissGroup(ctx context.Context, in *DismissGroupReq, opts ...grpc.CallOption) (*DismissGroupResp, error) + // 对某个群成员禁言 MuteGroupMember(ctx context.Context, in *MuteGroupMemberReq, opts ...grpc.CallOption) (*MuteGroupMemberResp, error) + // 对某个群成员取消禁言 CancelMuteGroupMember(ctx context.Context, in *CancelMuteGroupMemberReq, opts ...grpc.CallOption) (*CancelMuteGroupMemberResp, error) + // 对某个群禁言 MuteGroup(ctx context.Context, in *MuteGroupReq, opts ...grpc.CallOption) (*MuteGroupResp, error) + // 对某个群取消禁言 CancelMuteGroup(ctx context.Context, in *CancelMuteGroupReq, opts ...grpc.CallOption) (*CancelMuteGroupResp, error) - SetGroupMemberNickname(ctx context.Context, in *SetGroupMemberNicknameReq, opts ...grpc.CallOption) (*SetGroupMemberNicknameResp, error) + // 获取某个用户加入的超级群 GetJoinedSuperGroupList(ctx context.Context, in *GetJoinedSuperGroupListReq, opts ...grpc.CallOption) (*GetJoinedSuperGroupListResp, error) + // 获取指定的超级群信息 GetSuperGroupsInfo(ctx context.Context, in *GetSuperGroupsInfoReq, opts ...grpc.CallOption) (*GetSuperGroupsInfoResp, error) + // 设置群成员昵称 + SetGroupMemberNickname(ctx context.Context, in *SetGroupMemberNicknameReq, opts ...grpc.CallOption) (*SetGroupMemberNicknameResp, error) + // 设置群成员信息 SetGroupMemberInfo(ctx context.Context, in *SetGroupMemberInfoReq, opts ...grpc.CallOption) (*SetGroupMemberInfoResp, error) + // 获取群信息hash值 GetGroupAbstractInfo(ctx context.Context, in *GetGroupAbstractInfoReq, opts ...grpc.CallOption) (*GetGroupAbstractInfoResp, error) } @@ -3352,15 +2838,6 @@ func (c *groupClient) InviteUserToGroup(ctx context.Context, in *InviteUserToGro return out, nil } -func (c *groupClient) GetGroupAllMember(ctx context.Context, in *GetGroupAllMemberReq, opts ...grpc.CallOption) (*GetGroupAllMemberResp, error) { - out := new(GetGroupAllMemberResp) - err := grpc.Invoke(ctx, "/group.group/getGroupAllMember", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *groupClient) GetGroups(ctx context.Context, in *GetGroupsReq, opts ...grpc.CallOption) (*GetGroupsResp, error) { out := new(GetGroupsResp) err := grpc.Invoke(ctx, "/group.group/GetGroups", in, out, c.cc, opts...) @@ -3424,15 +2901,6 @@ func (c *groupClient) CancelMuteGroup(ctx context.Context, in *CancelMuteGroupRe return out, nil } -func (c *groupClient) SetGroupMemberNickname(ctx context.Context, in *SetGroupMemberNicknameReq, opts ...grpc.CallOption) (*SetGroupMemberNicknameResp, error) { - out := new(SetGroupMemberNicknameResp) - err := grpc.Invoke(ctx, "/group.group/SetGroupMemberNickname", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *groupClient) GetJoinedSuperGroupList(ctx context.Context, in *GetJoinedSuperGroupListReq, opts ...grpc.CallOption) (*GetJoinedSuperGroupListResp, error) { out := new(GetJoinedSuperGroupListResp) err := grpc.Invoke(ctx, "/group.group/GetJoinedSuperGroupList", in, out, c.cc, opts...) @@ -3451,6 +2919,15 @@ func (c *groupClient) GetSuperGroupsInfo(ctx context.Context, in *GetSuperGroups return out, nil } +func (c *groupClient) SetGroupMemberNickname(ctx context.Context, in *SetGroupMemberNicknameReq, opts ...grpc.CallOption) (*SetGroupMemberNicknameResp, error) { + out := new(SetGroupMemberNicknameResp) + err := grpc.Invoke(ctx, "/group.group/SetGroupMemberNickname", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *groupClient) SetGroupMemberInfo(ctx context.Context, in *SetGroupMemberInfoReq, opts ...grpc.CallOption) (*SetGroupMemberInfoResp, error) { out := new(SetGroupMemberInfoResp) err := grpc.Invoke(ctx, "/group.group/SetGroupMemberInfo", in, out, c.cc, opts...) @@ -3472,32 +2949,55 @@ func (c *groupClient) GetGroupAbstractInfo(ctx context.Context, in *GetGroupAbst // Server API for Group service type GroupServer interface { + // 创建群 CreateGroup(context.Context, *CreateGroupReq) (*CreateGroupResp, error) + // 申请加群 JoinGroup(context.Context, *JoinGroupReq) (*JoinGroupResp, error) + // 退出群 QuitGroup(context.Context, *QuitGroupReq) (*QuitGroupResp, error) + // 获取指定群信息 GetGroupsInfo(context.Context, *GetGroupsInfoReq) (*GetGroupsInfoResp, error) + // 设置群信息 SetGroupInfo(context.Context, *SetGroupInfoReq) (*SetGroupInfoResp, error) + // (以管理员或群主身份)获取群的加群申请 GetGroupApplicationList(context.Context, *GetGroupApplicationListReq) (*GetGroupApplicationListResp, error) + // 获取用户自己的主动加群申请 GetUserReqApplicationList(context.Context, *GetUserReqApplicationListReq) (*GetUserReqApplicationListResp, error) + // 转让群主 TransferGroupOwner(context.Context, *TransferGroupOwnerReq) (*TransferGroupOwnerResp, error) + // 群主或管理员处理进群申请 GroupApplicationResponse(context.Context, *GroupApplicationResponseReq) (*GroupApplicationResponseResp, error) + // 获取某个群的群成员 GetGroupMemberList(context.Context, *GetGroupMemberListReq) (*GetGroupMemberListResp, error) + // 获取某个群的指定群成员 GetGroupMembersInfo(context.Context, *GetGroupMembersInfoReq) (*GetGroupMembersInfoResp, error) + // 踢出群 KickGroupMember(context.Context, *KickGroupMemberReq) (*KickGroupMemberResp, error) + // 获取某个人已加入群 GetJoinedGroupList(context.Context, *GetJoinedGroupListReq) (*GetJoinedGroupListResp, error) + // 邀请某些人进群 InviteUserToGroup(context.Context, *InviteUserToGroupReq) (*InviteUserToGroupResp, error) - GetGroupAllMember(context.Context, *GetGroupAllMemberReq) (*GetGroupAllMemberResp, error) GetGroups(context.Context, *GetGroupsReq) (*GetGroupsResp, error) GetGroupMembersCMS(context.Context, *GetGroupMembersCMSReq) (*GetGroupMembersCMSResp, error) + // 解散群 DismissGroup(context.Context, *DismissGroupReq) (*DismissGroupResp, error) + // 对某个群成员禁言 MuteGroupMember(context.Context, *MuteGroupMemberReq) (*MuteGroupMemberResp, error) + // 对某个群成员取消禁言 CancelMuteGroupMember(context.Context, *CancelMuteGroupMemberReq) (*CancelMuteGroupMemberResp, error) + // 对某个群禁言 MuteGroup(context.Context, *MuteGroupReq) (*MuteGroupResp, error) + // 对某个群取消禁言 CancelMuteGroup(context.Context, *CancelMuteGroupReq) (*CancelMuteGroupResp, error) - SetGroupMemberNickname(context.Context, *SetGroupMemberNicknameReq) (*SetGroupMemberNicknameResp, error) + // 获取某个用户加入的超级群 GetJoinedSuperGroupList(context.Context, *GetJoinedSuperGroupListReq) (*GetJoinedSuperGroupListResp, error) + // 获取指定的超级群信息 GetSuperGroupsInfo(context.Context, *GetSuperGroupsInfoReq) (*GetSuperGroupsInfoResp, error) + // 设置群成员昵称 + SetGroupMemberNickname(context.Context, *SetGroupMemberNicknameReq) (*SetGroupMemberNicknameResp, error) + // 设置群成员信息 SetGroupMemberInfo(context.Context, *SetGroupMemberInfoReq) (*SetGroupMemberInfoResp, error) + // 获取群信息hash值 GetGroupAbstractInfo(context.Context, *GetGroupAbstractInfoReq) (*GetGroupAbstractInfoResp, error) } @@ -3757,24 +3257,6 @@ func _Group_InviteUserToGroup_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Group_GetGroupAllMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupAllMemberReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetGroupAllMember(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/group.group/GetGroupAllMember", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetGroupAllMember(ctx, req.(*GetGroupAllMemberReq)) - } - return interceptor(ctx, in, info, handler) -} - func _Group_GetGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetGroupsReq) if err := dec(in); err != nil { @@ -3901,24 +3383,6 @@ func _Group_CancelMuteGroup_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } -func _Group_SetGroupMemberNickname_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetGroupMemberNicknameReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).SetGroupMemberNickname(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/group.group/SetGroupMemberNickname", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).SetGroupMemberNickname(ctx, req.(*SetGroupMemberNicknameReq)) - } - return interceptor(ctx, in, info, handler) -} - func _Group_GetJoinedSuperGroupList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetJoinedSuperGroupListReq) if err := dec(in); err != nil { @@ -3955,6 +3419,24 @@ func _Group_GetSuperGroupsInfo_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Group_SetGroupMemberNickname_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetGroupMemberNicknameReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServer).SetGroupMemberNickname(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/group.group/SetGroupMemberNickname", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServer).SetGroupMemberNickname(ctx, req.(*SetGroupMemberNicknameReq)) + } + return interceptor(ctx, in, info, handler) +} + func _Group_SetGroupMemberInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SetGroupMemberInfoReq) if err := dec(in); err != nil { @@ -4051,10 +3533,6 @@ var _Group_serviceDesc = grpc.ServiceDesc{ MethodName: "inviteUserToGroup", Handler: _Group_InviteUserToGroup_Handler, }, - { - MethodName: "getGroupAllMember", - Handler: _Group_GetGroupAllMember_Handler, - }, { MethodName: "GetGroups", Handler: _Group_GetGroups_Handler, @@ -4083,10 +3561,6 @@ var _Group_serviceDesc = grpc.ServiceDesc{ MethodName: "CancelMuteGroup", Handler: _Group_CancelMuteGroup_Handler, }, - { - MethodName: "SetGroupMemberNickname", - Handler: _Group_SetGroupMemberNickname_Handler, - }, { MethodName: "GetJoinedSuperGroupList", Handler: _Group_GetJoinedSuperGroupList_Handler, @@ -4095,6 +3569,10 @@ var _Group_serviceDesc = grpc.ServiceDesc{ MethodName: "GetSuperGroupsInfo", Handler: _Group_GetSuperGroupsInfo_Handler, }, + { + MethodName: "SetGroupMemberNickname", + Handler: _Group_SetGroupMemberNickname_Handler, + }, { MethodName: "SetGroupMemberInfo", Handler: _Group_SetGroupMemberInfo_Handler, @@ -4108,141 +3586,129 @@ var _Group_serviceDesc = grpc.ServiceDesc{ Metadata: "group/group.proto", } -func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_0c3e6f244ba2c79e) } +func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_908b1d0f9beeddfc) } -var fileDescriptor_group_0c3e6f244ba2c79e = []byte{ - // 2122 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4f, 0x6f, 0x1c, 0x49, - 0x15, 0x57, 0x8f, 0x67, 0x9c, 0xf8, 0xd9, 0x93, 0x71, 0xca, 0xb1, 0x33, 0xe9, 0x4c, 0x12, 0x6f, - 0x6f, 0x58, 0x22, 0x94, 0xb5, 0x91, 0x57, 0x5a, 0x01, 0x0b, 0x5a, 0xb2, 0x36, 0x49, 0x66, 0x37, - 0x33, 0xc6, 0x3d, 0x5e, 0x22, 0x05, 0xad, 0x4c, 0x7b, 0xa6, 0xa6, 0xb7, 0xd7, 0x33, 0xdd, 0xed, - 0xae, 0xee, 0x38, 0xe2, 0xc4, 0x19, 0x21, 0x84, 0x84, 0x84, 0x90, 0xf8, 0x23, 0xe0, 0x02, 0x08, - 0x09, 0x71, 0x80, 0xc3, 0x9e, 0xf8, 0x02, 0x9c, 0x91, 0xe0, 0xc8, 0x17, 0xe0, 0x2b, 0xa0, 0xae, - 0xaa, 0xae, 0xae, 0xfe, 0x3b, 0x93, 0x74, 0x4c, 0x72, 0x19, 0xa9, 0x5e, 0xbd, 0xaa, 0x7a, 0xef, - 0xf5, 0xab, 0x5f, 0xbd, 0x3f, 0x03, 0x97, 0x4d, 0xcf, 0x09, 0xdc, 0x6d, 0xfa, 0xbb, 0xe5, 0x7a, - 0x8e, 0xef, 0xa0, 0x06, 0x1d, 0xa8, 0x77, 0xf6, 0x5d, 0x6c, 0xbf, 0xdd, 0xed, 0xbd, 0x3d, 0xc0, - 0xde, 0x53, 0xec, 0x6d, 0xbb, 0x27, 0xe6, 0x36, 0x65, 0xd8, 0x26, 0xa3, 0x93, 0xa3, 0x33, 0xb2, - 0x7d, 0x46, 0xd8, 0x02, 0x75, 0x6b, 0x26, 0xa7, 0x67, 0xb8,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b, 0x52, 0xea, 0x9b, 0x33, 0x79, 0x98, 0xdc, 0x66, 0xa6, 0x81, 0x20, 0xe4, 0xce, 0xed, 0x7f, - 0x08, 0xb9, 0x0b, 0x3a, 0x0f, 0x87, 0xb0, 0x66, 0x66, 0x8b, 0xe8, 0x28, 0x7f, 0x95, 0xf0, 0xb2, - 0x9b, 0x65, 0xd3, 0xc4, 0x45, 0x0f, 0xa1, 0x75, 0x92, 0xac, 0x03, 0xa3, 0xe8, 0x0f, 0x37, 0xd9, - 0x7a, 0xb8, 0xaa, 0x16, 0x4d, 0x09, 0x95, 0x53, 0xb5, 0x54, 0x59, 0xe5, 0x6c, 0x79, 0x57, 0x56, - 0x39, 0xaf, 0x08, 0xdb, 0x8f, 0x8a, 0x93, 0x52, 0x45, 0x11, 0x5d, 0x8f, 0xea, 0x7e, 0x39, 0x25, - 0x52, 0xb5, 0x53, 0x3c, 0xc9, 0xf6, 0x33, 0xd3, 0x15, 0x37, 0xb1, 0x5f, 0x5e, 0xa9, 0x50, 0xed, - 0x14, 0x4f, 0x32, 0x90, 0x10, 0xb7, 0x57, 0x80, 0x84, 0x5c, 0x8d, 0x12, 0x20, 0x91, 0xac, 0xf8, - 0x1c, 0x00, 0xca, 0x16, 0x07, 0x0a, 0xbc, 0x83, 0xd7, 0x3b, 0x0a, 0xbc, 0x43, 0x54, 0x15, 0xde, - 0x87, 0x15, 0x39, 0x05, 0x16, 0x98, 0x91, 0x4a, 0xc1, 0x05, 0x66, 0x64, 0xf2, 0xe5, 0x87, 0xd0, - 0x4a, 0x25, 0x57, 0xc2, 0x11, 0xb2, 0x09, 0xa0, 0x70, 0x84, 0xbc, 0x7c, 0xec, 0x09, 0xac, 0xe7, - 0x26, 0x6b, 0xe8, 0x56, 0x84, 0xd1, 0x05, 0x69, 0xa5, 0xba, 0x59, 0xce, 0xc0, 0x2c, 0x2e, 0xc8, - 0xc2, 0xe2, 0x72, 0x02, 0x24, 0x2c, 0x9e, 0xcc, 0x53, 0x1e, 0x42, 0x2b, 0xb5, 0xa9, 0xd0, 0x2e, - 0x9b, 0x44, 0x09, 0xed, 0xf2, 0x32, 0x9e, 0x4f, 0xd2, 0x01, 0x42, 0x94, 0x08, 0xa0, 0xcd, 0x14, - 0x1c, 0x67, 0x12, 0x1a, 0xf5, 0x8d, 0x19, 0x1c, 0x0c, 0xba, 0x0b, 0xa2, 0x72, 0x19, 0xba, 0x0b, - 0x52, 0x05, 0x19, 0xba, 0x0b, 0x03, 0x7b, 0xe6, 0x7c, 0xa9, 0x18, 0x57, 0x76, 0xbe, 0x6c, 0xe0, - 0x2d, 0x3b, 0x5f, 0x5e, 0x70, 0x7c, 0x00, 0x28, 0x1b, 0x34, 0x89, 0x2d, 0x73, 0x63, 0x56, 0xb1, - 0x65, 0x41, 0xb4, 0xf5, 0x58, 0xaa, 0xdd, 0x4b, 0xa1, 0x0b, 0x4a, 0xe3, 0x59, 0x2a, 0x96, 0x52, - 0x6f, 0x95, 0xce, 0x13, 0xf7, 0x83, 0x5b, 0x4f, 0x6e, 0xec, 0xbb, 0xd8, 0x3e, 0xea, 0xf6, 0xa4, - 0x3f, 0x3c, 0xd2, 0x35, 0xef, 0xd1, 0xdf, 0xe3, 0x45, 0x4a, 0x7a, 0xe7, 0x7f, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x96, 0x88, 0x8a, 0x2e, 0x63, 0x29, 0x00, 0x00, +var fileDescriptor_group_908b1d0f9beeddfc = []byte{ + // 1925 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x5f, 0x73, 0x1b, 0x49, + 0x11, 0xaf, 0x95, 0x23, 0xc7, 0x6e, 0xdb, 0xb1, 0x33, 0x8e, 0x1c, 0x65, 0xa3, 0x24, 0xbe, 0xb9, + 0x70, 0xb8, 0x20, 0xb1, 0x29, 0x1f, 0x5c, 0x71, 0x1c, 0x55, 0x47, 0x2e, 0x21, 0x39,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 0xde, 0x74, 0xb7, 0x6c, 0x64, + 0x8e, 0x40, 0x97, 0x5f, 0x17, 0x8d, 0x3c, 0xda, 0x94, 0x4c, 0xfa, 0xa8, 0xc1, 0xbd, 0x65, 0x12, + 0x85, 0xdc, 0x79, 0xd1, 0x07, 0x2b, 0x39, 0xbd, 0x87, 0x56, 0x72, 0xa5, 0x76, 0x99, 0x67, 0x9a, + 0x3e, 0x40, 0x44, 0xb7, 0x8b, 0x63, 0x57, 0x86, 0x91, 0x6e, 0xdb, 0xbe, 0xc0, 0x28, 0xfa, 0x18, + 0x56, 0x99, 0x36, 0xca, 0x43, 0xc5, 0xd9, 0x2a, 0x03, 0x44, 0xf7, 0xb6, 0x95, 0xce, 0x28, 0xfa, + 0x35, 0xdc, 0x0e, 0xec, 0x13, 0x37, 0xf4, 0x4e, 0x45, 0xab, 0x39, 0x0d, 0x73, 0xf1, 0x2c, 0x16, + 0x46, 0xd1, 0x10, 0xee, 0x04, 0x75, 0x23, 0x2d, 0xf4, 0xee, 0x64, 0x83, 0xda, 0x99, 0x9b, 0xfb, + 0x70, 0x36, 0x13, 0xa3, 0xe8, 0x25, 0xa0, 0xd4, 0x18, 0x19, 0xa1, 0x8e, 0x94, 0xb5, 0x0e, 0xb4, + 0xdc, 0x7b, 0x53, 0x56, 0x19, 0x45, 0x7d, 0x68, 0x07, 0x35, 0xb3, 0x12, 0x84, 0x4b, 0x31, 0x6a, + 0x9d, 0xf4, 0xb8, 0xef, 0xce, 0xe4, 0x11, 0x76, 0x07, 0xc6, 0x8c, 0x42, 0xd9, 0x6d, 0x9d, 0xa7, + 0x28, 0xbb, 0x6b, 0x86, 0x1b, 0xaf, 0x60, 0x33, 0x30, 0x47, 0x05, 0xc8, 0x2e, 0xa5, 0xa2, 0xec, + 0xfe, 0xb4, 0x65, 0x9e, 0xb1, 0xeb, 0x67, 0xe5, 0x66, 0x1b, 0x15, 0xff, 0x08, 0x98, 0x53, 0x03, + 0xd7, 0xad, 0x5b, 0x52, 0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xdb, 0xc1, 0x0d, 0xfa, + 0x52, 0x9b, 0xd8, 0xe8, 0x38, 0xa5, 0x5a, 0x7f, 0x2a, 0xc8, 0xc7, 0x7d, 0x30, 0x75, 0x9d, 0xd1, + 0x4f, 0x1e, 0x7c, 0x75, 0xef, 0x98, 0x92, 0xe8, 0xe4, 0xa0, 0xab, 0xfd, 0x83, 0xca, 0x65, 0x3e, + 0xe2, 0xbf, 0xa7, 0x8b, 0x9c, 0xf4, 0xfe, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x50, 0xb3, + 0x74, 0xb4, 0x1d, 0x00, 0x00, } diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto index 67fe6b916..486bb69df 100644 --- a/pkg/proto/group/group.proto +++ b/pkg/proto/group/group.proto @@ -13,57 +13,44 @@ message GroupAddMemberInfo{ message CreateGroupReq{ repeated GroupAddMemberInfo initMemberList = 1; server_api_params.GroupInfo groupInfo = 2; - string operationID = 3; - string opUserID = 4; //app manager or group owner string ownerUserID = 5; //owner - - } message CreateGroupResp{ - server_api_params.CommonResp commonResp = 1; server_api_params.GroupInfo groupInfo = 3; } message GetGroupsInfoReq{ repeated string groupIDList = 1; - string operationID = 2; - string opUserID = 3; //No verification permission } message GetGroupsInfoResp{ - server_api_params.CommonResp commonResp = 1; repeated server_api_params.GroupInfo groupInfoList = 3; } message SetGroupInfoReq{ server_api_params.GroupInfoForSet groupInfoForSet = 1; - string opUserID = 2; //app manager or group owner - string operationID = 3; } message SetGroupInfoResp{ - server_api_params.CommonResp commonResp = 1; } message GetGroupApplicationListReq { - string opUserID = 1; //app manager or group owner(manager) - string operationID = 2; - string fromUserID = 3; //owner or manager + server_api_params.RequestPagination pagination = 1; + string fromUserID = 3; //owner or admin } message GetGroupApplicationListResp { - server_api_params.CommonResp commonResp = 1; + int32 total = 1; repeated server_api_params.GroupRequest groupRequestList = 3; } message GetUserReqApplicationListReq{ string userID = 1; - string opUserID = 2; - string operationID = 3; + server_api_params.RequestPagination pagination = 2; } message GetUserReqApplicationListResp{ - server_api_params.CommonResp commonResp = 1; + int32 total = 1; repeated server_api_params.GroupRequest groupRequestList = 2; } @@ -72,76 +59,59 @@ message TransferGroupOwnerReq { string groupID = 1; string oldOwnerUserID = 2; string newOwnerUserID = 3; - string operationID = 4; - string opUserID = 5; //app manager or group owner } message TransferGroupOwnerResp{ - server_api_params.CommonResp commonResp = 1; + } message JoinGroupReq{ string groupID = 1; string reqMessage = 2; - string opUserID = 3; - string operationID = 4; int32 joinSource = 5; string inviterUserID = 6; - } message JoinGroupResp{ - server_api_params.CommonResp commonResp = 1; } message GroupApplicationResponseReq{ - string operationID = 1; - string opUserID = 2; string groupID = 3; string fromUserID = 4; // string handledMsg = 5; int32 handleResult = 6; } message GroupApplicationResponseResp{ - server_api_params.CommonResp commonResp = 1; + } message QuitGroupReq{ string groupID = 1; - string operationID = 2; - string opUserID = 3; } message QuitGroupResp{ - server_api_params.CommonResp commonResp = 1; } message GetGroupMemberListReq { string groupID = 1; - string opUserID = 2; //No verification permission - string operationID = 3; int32 filter = 4; - int32 nextSeq = 5; + server_api_params.RequestPagination pagination = 2; } message GetGroupMemberListResp { - server_api_params.CommonResp commonResp = 1; + int32 total = 1; repeated server_api_params.GroupMemberFullInfo memberList = 3; - int32 nextSeq = 4; } message GetGroupMembersInfoReq { string groupID = 1; repeated string memberList = 2; - string opUserID = 3; //No verification permission - string operationID = 4; } message GetGroupMembersInfoResp { - server_api_params.CommonResp commonResp = 1; repeated server_api_params.GroupMemberFullInfo memberList = 3; } @@ -149,8 +119,6 @@ message KickGroupMemberReq { string groupID = 1; repeated string kickedUserIDList = 2; string reason = 3; - string operationID = 5; - string opUserID = 6; //app manger or group manager } message Id2Result { @@ -159,44 +127,36 @@ message Id2Result { } message KickGroupMemberResp { - server_api_params.CommonResp commonResp = 1; repeated Id2Result id2ResultList = 3; } message GetJoinedGroupListReq { string fromUserID = 1; - string operationID = 2; - string opUserID = 3; //app manager or FromUserID + server_api_params.RequestPagination pagination = 2; } message GetJoinedGroupListResp{ - server_api_params.CommonResp commonResp = 1; + int32 total = 1; repeated server_api_params.GroupInfo groupList = 3; } message InviteUserToGroupReq { - string operationID = 2; string groupID = 3; string reason = 4; repeated string invitedUserIDList = 5; - string opUserID = 6; //group member or app manager } message InviteUserToGroupResp { - server_api_params.CommonResp commonResp = 1; repeated Id2Result id2ResultList = 3; // 0 ok, -1 error } message GetGroupAllMemberReq { string groupID = 1; - string opUserID = 2; //No verification permission - string operationID = 3; int32 offset = 4; int32 count = 5; } message GetGroupAllMemberResp { - server_api_params.CommonResp commonResp = 1; repeated server_api_params.GroupMemberFullInfo memberList = 3; } @@ -208,95 +168,74 @@ message CMSGroup { message GetGroupsReq { - server_api_params.RequestPagination pagination = 1; - string groupName = 2; - string groupID = 3; - string operationID = 4; + server_api_params.RequestPagination pagination = 1; + string groupName = 2; + string groupID = 3; } message GetGroupsResp { repeated CMSGroup groups = 1; - server_api_params.ResponsePagination pagination = 2; int32 GroupNum = 3; - server_api_params.CommonResp commonResp = 4; } message GetGroupMemberReq { string groupID = 1; - string operationID = 2; } message GetGroupMembersCMSReq { string groupID = 1; string userName = 2; server_api_params.RequestPagination pagination = 3; - string operationID = 4; } message GetGroupMembersCMSResp { repeated server_api_params.GroupMemberFullInfo members = 1; server_api_params.ResponsePagination pagination = 2; int32 memberNums = 3; - server_api_params.CommonResp commonResp = 4; } message DismissGroupReq{ - string opUserID = 1; //group or app manager - string operationID = 2; string groupID = 3; } message DismissGroupResp{ - server_api_params.CommonResp commonResp = 1; } message MuteGroupMemberReq{ - string opUserID = 1; //group or app manager - string operationID = 2; string groupID = 3; string userID = 4; uint32 mutedSeconds = 5; } message MuteGroupMemberResp{ - server_api_params.CommonResp commonResp = 1; } message CancelMuteGroupMemberReq{ - string opUserID = 1; //group or app manager - string operationID = 2; string groupID = 3; string userID = 4; } message CancelMuteGroupMemberResp{ - server_api_params.CommonResp commonResp = 1; } message MuteGroupReq{ - string opUserID = 1; //group or app manager - string operationID = 2; string groupID = 3; } message MuteGroupResp{ - server_api_params.CommonResp commonResp = 1; } message CancelMuteGroupReq{ - string opUserID = 1; //group or app manager - string operationID = 2; string groupID = 3; } message CancelMuteGroupResp{ - server_api_params.CommonResp commonResp = 1; } @@ -305,41 +244,32 @@ message CancelMuteGroupResp{ message SetGroupMemberNicknameReq{ string groupID = 1; string nickname = 2; - string opUserID = 3; - string operationID = 4; string userID = 5; } message SetGroupMemberNicknameResp{ - server_api_params.CommonResp commonResp = 1; } message GetJoinedSuperGroupListReq { - string operationID = 1; + server_api_params.RequestPagination pagination = 1; string userID = 2; - string opUserID = 3; } message GetJoinedSuperGroupListResp { - server_api_params.CommonResp commonResp = 1; + int32 total = 1; repeated server_api_params.GroupInfo groupList = 3; } message GetSuperGroupsInfoReq { repeated string groupIDList = 1; - string operationID = 2; - string opUserID = 3; //No verification permission } message GetSuperGroupsInfoResp { - server_api_params.CommonResp commonResp = 1; repeated server_api_params.GroupInfo groupInfoList = 3; } message SetGroupMemberInfoReq{ string groupID = 1; string userID = 2; - string opUserID = 3; - string operationID = 4; google.protobuf.StringValue nickname = 5; google.protobuf.StringValue faceURL = 6; google.protobuf.Int32Value roleLevel = 7; @@ -347,53 +277,77 @@ message SetGroupMemberInfoReq{ } message SetGroupMemberInfoResp{ - server_api_params.CommonResp commonResp = 1; + } message GetGroupAbstractInfoReq{ - string groupID = 1; - string opUserID = 2; - string operationID = 3; + repeated string groupIDs = 1; } -message GetGroupAbstractInfoResp{ - server_api_params.CommonResp commonResp = 1; +message GroupAbstractInfo{ + string groupID = 1; int32 groupMemberNumber = 2; uint64 groupMemberListHash = 3; } +message GetGroupAbstractInfoResp{ + repeated GroupAbstractInfo groupAbstractInfos = 1; +} + service group{ + //创建群 rpc createGroup(CreateGroupReq) returns(CreateGroupResp); + //申请加群 rpc joinGroup(JoinGroupReq) returns(JoinGroupResp); + //退出群 rpc quitGroup(QuitGroupReq) returns(QuitGroupResp); + //获取指定群信息 rpc getGroupsInfo(GetGroupsInfoReq) returns(GetGroupsInfoResp); + //设置群信息 rpc setGroupInfo(SetGroupInfoReq) returns(SetGroupInfoResp); + //(以管理员或群主身份)获取群的加群申请 rpc getGroupApplicationList(GetGroupApplicationListReq) returns(GetGroupApplicationListResp); + //获取用户自己的主动加群申请 rpc getUserReqApplicationList(GetUserReqApplicationListReq) returns(GetUserReqApplicationListResp); + //转让群主 rpc transferGroupOwner(TransferGroupOwnerReq) returns(TransferGroupOwnerResp); + //群主或管理员处理进群申请 rpc groupApplicationResponse(GroupApplicationResponseReq) returns(GroupApplicationResponseResp); + //获取某个群的群成员 rpc getGroupMemberList(GetGroupMemberListReq) returns(GetGroupMemberListResp); + //获取某个群的指定群成员 rpc getGroupMembersInfo(GetGroupMembersInfoReq) returns(GetGroupMembersInfoResp); + //踢出群 rpc kickGroupMember(KickGroupMemberReq) returns (KickGroupMemberResp); + //获取某个人已加入群 rpc getJoinedGroupList(GetJoinedGroupListReq) returns (GetJoinedGroupListResp); + //邀请某些人进群 rpc inviteUserToGroup(InviteUserToGroupReq) returns (InviteUserToGroupResp); - rpc getGroupAllMember(GetGroupAllMemberReq) returns(GetGroupAllMemberResp); rpc GetGroups(GetGroupsReq) returns(GetGroupsResp); rpc GetGroupMembersCMS(GetGroupMembersCMSReq) returns(GetGroupMembersCMSResp); - + //解散群 rpc DismissGroup(DismissGroupReq) returns(DismissGroupResp); + //对某个群成员禁言 rpc MuteGroupMember(MuteGroupMemberReq) returns(MuteGroupMemberResp); + //对某个群成员取消禁言 rpc CancelMuteGroupMember(CancelMuteGroupMemberReq) returns(CancelMuteGroupMemberResp); + //对某个群禁言 rpc MuteGroup(MuteGroupReq) returns(MuteGroupResp); + //对某个群取消禁言 rpc CancelMuteGroup(CancelMuteGroupReq) returns(CancelMuteGroupResp); - rpc SetGroupMemberNickname(SetGroupMemberNicknameReq) returns (SetGroupMemberNicknameResp); + //获取某个用户加入的超级群 rpc GetJoinedSuperGroupList(GetJoinedSuperGroupListReq) returns (GetJoinedSuperGroupListResp); + //获取指定的超级群信息 rpc GetSuperGroupsInfo(GetSuperGroupsInfoReq) returns (GetSuperGroupsInfoResp); + //设置群成员昵称 + rpc SetGroupMemberNickname(SetGroupMemberNicknameReq) returns (SetGroupMemberNicknameResp); + //设置群成员信息 rpc SetGroupMemberInfo(SetGroupMemberInfoReq) returns (SetGroupMemberInfoResp); + //获取群信息hash值 rpc GetGroupAbstractInfo(GetGroupAbstractInfoReq) returns (GetGroupAbstractInfoResp); } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index c7782cbbb..2ab391df5 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -519,10 +519,6 @@ message RequestPagination { int32 showNumber = 2; } -message ResponsePagination { - int32 CurrentPage = 5; - int32 ShowNumber = 6; -} ///////////////////signal//////////////