diff options
Diffstat (limited to 'app/controllers/remote_interaction_controller.rb')
-rw-r--r-- | app/controllers/remote_interaction_controller.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/remote_interaction_controller.rb b/app/controllers/remote_interaction_controller.rb index d7197d434..e058d0ed5 100644 --- a/app/controllers/remote_interaction_controller.rb +++ b/app/controllers/remote_interaction_controller.rb @@ -5,11 +5,14 @@ class RemoteInteractionController < ApplicationController layout 'modal' + before_action :authenticate_user!, if: :whitelist_mode? before_action :set_interaction_type before_action :set_status before_action :set_body_classes before_action :set_pack + skip_before_action :require_functional! + def new @remote_follow = RemoteFollow.new(session_params) end @@ -32,14 +35,13 @@ class RemoteInteractionController < ApplicationController end def session_params - { acct: session[:remote_follow] } + { acct: session[:remote_follow] || current_account&.username } end def set_status @status = Status.find(params[:id]) authorize @status, :show? rescue Mastodon::NotPermittedError - # Reraise in order to get a 404 raise ActiveRecord::RecordNotFound end |