视频连线
This commit is contained in:
@@ -81,7 +81,7 @@ var MeetingLeftReasonMap = map[string]string{
|
||||
|
||||
// 会议默认配置(应用层强制约束)
|
||||
const (
|
||||
MeetingMVPMaxMembers = 8 // MVP 阶段单会议硬上限
|
||||
MeetingMVPMaxMembers = 1000000 // MVP 阶段单会议硬上限
|
||||
MeetingRoomCodeLength = 9 // 会议号去连字符后的长度(XXX-XXX-XXX)
|
||||
MeetingRoomCodeRetryMax = 3 // 生成会议号冲突重试上限
|
||||
MeetingPasswordMaxAttempts = 5 // 密码连续错误锁定阈值
|
||||
|
||||
@@ -64,7 +64,7 @@ type MeetingChatDTO struct {
|
||||
type CreateMeetingRoomRequest struct {
|
||||
Title string `json:"title" binding:"required,min=1,max=200"` // 会议标题
|
||||
Password string `json:"password" binding:"omitempty,min=4,max=20"` // 可选入会密码(纯文本入参,服务端 bcrypt 哈希存储)
|
||||
MaxMembers int `json:"max_members" binding:"omitempty,min=2,max=8"` // 可选上限(MVP 硬上限 8,留参数为 Phase 2e-3 扩展)
|
||||
MaxMembers int `json:"max_members" binding:"omitempty,min=2"` // 可选上限
|
||||
}
|
||||
|
||||
// CreateMeetingRoomResponse 创建会议响应
|
||||
|
||||
@@ -250,7 +250,6 @@ func (ctl *MeetingController) CloudLawCreateMeeting(c *gin.Context) {
|
||||
}
|
||||
room, _, _, err := ctl.meetingService.CreateRoomForInternal(c.Request.Context(), hostUser.ID, &dto.CreateMeetingRoomRequest{
|
||||
Title: title,
|
||||
MaxMembers: 2,
|
||||
})
|
||||
if err != nil {
|
||||
ctl.handleError(c, err, "创建云律会议失败")
|
||||
|
||||
@@ -398,13 +398,6 @@ func (s *MeetingService) JoinRoomForInternal(ctx context.Context, userID int64,
|
||||
routerID, _ := s.mediaOrchestrator.ResolveRouterID(code)
|
||||
return room, existing, routerID, nil
|
||||
}
|
||||
activeCount, err := s.participantDAO.CountActiveByRoom(ctx, room.ID)
|
||||
if err != nil {
|
||||
return nil, nil, "", err
|
||||
}
|
||||
if int(activeCount) >= room.MaxMembers {
|
||||
return nil, nil, "", ErrMeetingFull
|
||||
}
|
||||
participant, err := s.participantDAO.JoinRoom(ctx, room.ID, userID, constants.MeetingRoleParticipant)
|
||||
if err != nil {
|
||||
if errors.Is(err, dao.ErrAlreadyInMeeting) {
|
||||
@@ -635,14 +628,6 @@ func (s *MeetingService) JoinRoom(ctx context.Context, userID int64, code, passw
|
||||
s.redis.Del(ctx, redisPasswordAttemptPrefix+code+":"+strconv.FormatInt(userID, 10))
|
||||
}
|
||||
|
||||
activeCount, err := s.participantDAO.CountActiveByRoom(ctx, room.ID)
|
||||
if err != nil {
|
||||
return nil, nil, "", err
|
||||
}
|
||||
if int(activeCount) >= room.MaxMembers {
|
||||
return nil, nil, "", ErrMeetingFull
|
||||
}
|
||||
|
||||
participant, err := s.participantDAO.JoinRoom(ctx, room.ID, userID, constants.MeetingRoleParticipant)
|
||||
if err != nil {
|
||||
return nil, nil, "", err
|
||||
|
||||
Reference in New Issue
Block a user