about summary refs log tree commit diff
path: root/app/controllers/statuses_controller.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-03-18 18:03:27 +0100
committerThibaut Girka <thib@sitedethib.com>2019-03-18 18:03:27 +0100
commit291012ec0c08f5323b2102eb4d2dc8714ddce4d9 (patch)
tree09e7a5fef106da1b6ebdc53ac0df62cafc159520 /app/controllers/statuses_controller.rb
parent6e3a4bcbc70bb33bfb0746cf3b2186ee9f4e6515 (diff)
parentf85b66eb8cc9513822d0ece3928b12aa789bb410 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/controllers/accounts_controller.rb
- app/controllers/follower_accounts_controller.rb
- app/controllers/statuses_controller.rb

All conflicts caused by the additional `use_pack` used for glitch-soc's theming
system.
Diffstat (limited to 'app/controllers/statuses_controller.rb')
-rw-r--r--app/controllers/statuses_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb
index 6f56a67ba..53cf1c4ca 100644
--- a/app/controllers/statuses_controller.rb
+++ b/app/controllers/statuses_controller.rb
@@ -28,6 +28,8 @@ class StatusesController < ApplicationController
     respond_to do |format|
       format.html do
         use_pack 'public'
+        mark_cacheable! unless user_signed_in?
+
         @body_classes = 'with-modals'
 
         set_ancestors
@@ -37,7 +39,7 @@ class StatusesController < ApplicationController
       end
 
       format.json do
-        skip_session! unless @stream_entry.hidden?
+        mark_cacheable! unless @stream_entry.hidden?
 
         render_cached_json(['activitypub', 'note', @status], content_type: 'application/activity+json', public: !@stream_entry.hidden?) do
           ActiveModelSerializers::SerializableResource.new(@status, serializer: ActivityPub::NoteSerializer, adapter: ActivityPub::Adapter)