forked from External/greenlight
Join meeting name is now stored in a session cookie (#432)
This commit is contained in:
parent
4d648534f7
commit
f6715b83ae
|
@ -56,6 +56,15 @@ class RoomsController < ApplicationController
|
||||||
@recordings = recs
|
@recordings = recs
|
||||||
@is_running = @room.running?
|
@is_running = @room.running?
|
||||||
else
|
else
|
||||||
|
# Get users name
|
||||||
|
@name = if current_user
|
||||||
|
current_user.name
|
||||||
|
elsif cookies.encrypted[:greenlight_name]
|
||||||
|
cookies.encrypted[:greenlight_name]
|
||||||
|
else
|
||||||
|
""
|
||||||
|
end
|
||||||
|
|
||||||
render :join
|
render :join
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -91,6 +100,9 @@ class RoomsController < ApplicationController
|
||||||
end
|
end
|
||||||
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)
|
if @room.running? || @room.owned_by?(current_user)
|
||||||
# Determine if the user needs to join as a moderator.
|
# Determine if the user needs to join as a moderator.
|
||||||
opts[:user_is_moderator] = @room.owned_by?(current_user)
|
opts[:user_is_moderator] = @room.owned_by?(current_user)
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
required: true,
|
required: true,
|
||||||
class: "form-control join-form",
|
class: "form-control join-form",
|
||||||
placeholder: t("enter_your_name"),
|
placeholder: t("enter_your_name"),
|
||||||
value: "#{current_user ? current_user.name : ''}",
|
value: "#{@name}",
|
||||||
readonly: !current_user.nil? %>
|
readonly: !current_user.nil? %>
|
||||||
<%= f.submit t("room.join"), class: "btn btn-primary btn-sm col-sm-3 form-control join-form" %>
|
<%= f.submit t("room.join"), class: "btn btn-primary btn-sm col-sm-3 form-control join-form" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue