Simplify instance presenter view access (#26046)

This commit is contained in:
Matt Jankowski authored and GitHub committed 2023-09-28 16:52:37 +02:00
1 parent 2016c5d912
commit 340f1a68be
11 files changed
+5 -58

No files matched your search

-5
View File
@@ -10,7 +10,6 @@ class StatusesController < ApplicationController
before_action :require_account_signature!, only: [:show, :activity], if: -> { request.format == :json && authorized_fetch_mode? }
before_action :set_status
before_action :set_instance_presenter
before_action :redirect_to_original, only: :show
before_action :set_body_classes, only: :embed
@@ -67,10 +66,6 @@ class StatusesController < ApplicationController
not_found
end
def set_instance_presenter
@instance_presenter = InstancePresenter.new
end
def redirect_to_original
redirect_to(ActivityPub::TagManager.instance.url_for(@status.reblog), allow_other_host: true) if @status.reblog?
end