forked from External/greenlight
implement wait for moderator
This commit is contained in:
@ -42,7 +42,7 @@ class MeetingsController < ApplicationController
|
||||
if params[:join_name]
|
||||
redirect_to @meeting.join_path(params[:join_name], opts)
|
||||
else
|
||||
# Render the join page so they can supploy their name.
|
||||
# Render the join page so they can supply their name.
|
||||
render :join
|
||||
end
|
||||
end
|
||||
@ -54,15 +54,33 @@ class MeetingsController < ApplicationController
|
||||
else
|
||||
# Send the user to a polling page that will auto join them when it starts.
|
||||
# The wait action/page handles input of name for unauthenticated users.
|
||||
render :wait
|
||||
redirect_to wait_meeting_path(room_uid: @meeting.room.uid, meeting_uid: @meeting.uid)
|
||||
end
|
||||
end
|
||||
else
|
||||
# Handle meeting doesn't exist.
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
# GET /rooms/:room_uid/meetings/:meeting_uid/wait
|
||||
def wait
|
||||
@meeting = Meeting.find_by(uid: params[:meeting_uid])
|
||||
|
||||
if @meeting
|
||||
if @meeting.is_running?
|
||||
if current_user
|
||||
# If they are logged in and waiting, use their account name.
|
||||
redirect_to @meeting.join_path(current_user.name, default_meeting_options)
|
||||
elsif !params[:unauthenticated_join_name].blank?
|
||||
# Otherwise, use the name they submitted on the wating page.
|
||||
redirect_to @meeting.join_path(params[:unauthenticated_join_name], default_meeting_options)
|
||||
end
|
||||
end
|
||||
else
|
||||
# Handle meeting doesn't exist.
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
@ -75,6 +93,7 @@ class MeetingsController < ApplicationController
|
||||
{
|
||||
user_is_moderator: false,
|
||||
meeting_logout_url: request.base_url + room_path(room_uid: @meeting.room.uid),
|
||||
meeting_recorded: true,
|
||||
moderator_message: "To invite someone to the meeting, send them this link:
|
||||
#{request.base_url + join_meeting_path(room_uid: @meeting.room.uid, meeting_uid: @meeting.uid)}"
|
||||
}
|
||||
|
2
app/controllers/users_controller.rb
Normal file
2
app/controllers/users_controller.rb
Normal file
@ -0,0 +1,2 @@
|
||||
class UsersController < ApplicationController
|
||||
end
|
Reference in New Issue
Block a user