Join meeting name is now stored in a session cookie (#432)

This commit is contained in:
farhatahmad
2019-04-10 17:06:19 -04:00
committed by Jesus Federico
parent 4d648534f7
commit f6715b83ae
2 changed files with 13 additions and 1 deletions

View File

@ -56,6 +56,15 @@ class RoomsController < ApplicationController
@recordings = recs
@is_running = @room.running?
else
# Get users name
@name = if current_user
current_user.name
elsif cookies.encrypted[:greenlight_name]
cookies.encrypted[:greenlight_name]
else
""
end
render :join
end
end
@ -91,6 +100,9 @@ class RoomsController < ApplicationController
end
end
# create or update cookie with join name
cookies.encrypted[:greenlight_name] = @join_name unless cookies.encrypted[:greenlight_name] == @join_name
if @room.running? || @room.owned_by?(current_user)
# Determine if the user needs to join as a moderator.
opts[:user_is_moderator] = @room.owned_by?(current_user)