about summary refs log tree commit diff
path: root/app/controllers/statuses_controller.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-10-31 18:25:34 +0100
committerGitHub <noreply@github.com>2022-10-31 18:25:34 +0100
commit968f34300681d8082cf2f824722a3945fc604b2d (patch)
tree910675cc3b8d9022f65bcfa9bee1acee6af8d0e4 /app/controllers/statuses_controller.rb
parent371563b0e249b6369e04709fb974a8e57413529f (diff)
parent1fe4e5e38c17a726e6aea5d6033139653e89a379 (diff)
Merge pull request #1876 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/statuses_controller.rb')
-rw-r--r--app/controllers/statuses_controller.rb14
1 files changed, 2 insertions, 12 deletions
diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb
index 55cc3790f..6986176ea 100644
--- a/app/controllers/statuses_controller.rb
+++ b/app/controllers/statuses_controller.rb
@@ -1,21 +1,19 @@
 # frozen_string_literal: true
 
 class StatusesController < ApplicationController
+  include WebAppControllerConcern
   include StatusControllerConcern
   include SignatureAuthentication
   include Authorization
   include AccountOwnedConcern
 
-  layout 'public'
-
   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 :set_link_headers
   before_action :redirect_to_original, only: :show
-  before_action :set_referrer_policy_header, only: :show
   before_action :set_cache_headers
-  before_action :set_body_classes
+  before_action :set_body_classes, only: :embed
 
   skip_around_action :set_locale, if: -> { request.format == :json }
   skip_before_action :require_functional!, only: [:show, :embed], unless: :whitelist_mode?
@@ -27,11 +25,7 @@ class StatusesController < ApplicationController
   def show
     respond_to do |format|
       format.html do
-        use_pack 'public'
-
         expires_in 10.seconds, public: true if current_account.nil?
-        set_ancestors
-        set_descendants
       end
 
       format.json do
@@ -80,8 +74,4 @@ class StatusesController < ApplicationController
   def redirect_to_original
     redirect_to ActivityPub::TagManager.instance.url_for(@status.reblog) if @status.reblog?
   end
-
-  def set_referrer_policy_header
-    response.headers['Referrer-Policy'] = 'origin' unless @status.distributable?
-  end
 end