gen group pb

This commit is contained in:
withchao 2023-05-31 15:54:42 +08:00
parent f61a5429a0
commit e8763f32d0
4 changed files with 521 additions and 526 deletions

View File

@ -141,7 +141,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
if err := tokenverify.CheckAccessV3(ctx, req.OwnerUserID); err != nil { if err := tokenverify.CheckAccessV3(ctx, req.OwnerUserID); err != nil {
return nil, err return nil, err
} }
userIDs := append(append(req.InitMembers, req.AdminUserIDs...), req.OwnerUserID) userIDs := append(append(req.MemberUserIDs, req.AdminUserIDs...), req.OwnerUserID)
opUserID := mcontext.GetOpUserID(ctx) opUserID := mcontext.GetOpUserID(ctx)
if !utils.Contain(opUserID, userIDs...) { if !utils.Contain(opUserID, userIDs...) {
userIDs = append(userIDs, opUserID) userIDs = append(userIDs, opUserID)
@ -190,7 +190,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
return nil, err return nil, err
} }
} }
for _, userID := range req.InitMembers { for _, userID := range req.MemberUserIDs {
if err := joinGroup(userID, constant.GroupOrdinaryUsers); err != nil { if err := joinGroup(userID, constant.GroupOrdinaryUsers); err != nil {
return nil, err return nil, err
} }

View File

@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.29.1
// protoc v4.22.0 // protoc v4.22.0
// source: errinfo/errinfo.proto // source: errinfo/errinfo.proto
package errinfo package errinfo
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@ -21,20 +20,16 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type ErrorInfo struct { type ErrorInfo struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
Line uint32 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"` Line uint32 `protobuf:"varint,2,opt,name=line,proto3" json:"line"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"`
Cause string `protobuf:"bytes,4,opt,name=cause,proto3" json:"cause,omitempty"` Cause string `protobuf:"bytes,4,opt,name=cause,proto3" json:"cause"`
Warp []string `protobuf:"bytes,5,rep,name=warp,proto3" json:"warp,omitempty"` Warp []string `protobuf:"bytes,5,rep,name=warp,proto3" json:"warp"`
} }
func (x *ErrorInfo) Reset() { func (x *ErrorInfo) Reset() {

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group";
message CreateGroupReq{ message CreateGroupReq{
repeated string initMembers = 1; repeated string memberUserIDs = 1;
sdkws.GroupInfo groupInfo = 2; sdkws.GroupInfo groupInfo = 2;
repeated string adminUserIDs = 3; repeated string adminUserIDs = 3;
string ownerUserID = 4; //owner string ownerUserID = 4; //owner