视频连线
This commit is contained in:
@@ -249,8 +249,7 @@ func (ctl *MeetingController) CloudLawCreateMeeting(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
room, _, _, err := ctl.meetingService.CreateRoomForInternal(c.Request.Context(), hostUser.ID, &dto.CreateMeetingRoomRequest{
|
||||
Title: title,
|
||||
MaxMembers: 2,
|
||||
Title: title,
|
||||
})
|
||||
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