|
|
@@ -85,14 +85,15 @@ func (g *Group) ToProto() *pb.Group { |
|
|
|
func CreateGroup(userId, masterId int64, in *pb.CreateGroupReq) *Group { |
|
|
|
now := time.Now() |
|
|
|
group := &Group{ |
|
|
|
Name: in.Name, |
|
|
|
AvatarUrl: in.AvatarUrl, |
|
|
|
Introduction: in.Introduction, |
|
|
|
MasterId: masterId, |
|
|
|
Extra: in.Extra, |
|
|
|
Members: make([]GroupUser, 0, len(in.MemberIds)+1), |
|
|
|
CreateTime: now, |
|
|
|
UpdateTime: now, |
|
|
|
Name: in.Name, |
|
|
|
AvatarUrl: in.AvatarUrl, |
|
|
|
Introduction: in.Introduction, |
|
|
|
MasterId: masterId, |
|
|
|
Extra: in.Extra, |
|
|
|
Members: make([]GroupUser, 0, len(in.MemberIds)+1), |
|
|
|
IsAllMemberBanned: 2, |
|
|
|
CreateTime: now, |
|
|
|
UpdateTime: now, |
|
|
|
} |
|
|
|
|
|
|
|
// 创建者添加为群主 |
|
|
|