about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/statuses_controller.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb
index a3ba43d7b..ad065a6fa 100644
--- a/app/controllers/statuses_controller.rb
+++ b/app/controllers/statuses_controller.rb
@@ -39,7 +39,12 @@ class StatusesController < ApplicationController
 
       format.json do
         expires_in 3.minutes, public: @status.distributable? && public_fetch_mode?
-        render_with_cache json: @status, content_type: 'application/activity+json', serializer: ActivityPub::NoteSerializer, adapter: ActivityPub::Adapter, domain: current_account&.domain
+        render_with_cache json: @status,
+                          content_type: 'application/activity+json',
+                          serializer: ActivityPub::NoteSerializer,
+                          adapter: ActivityPub::Adapter,
+                          domain: current_account&.domain,
+                          key: "statuses/json:#{current_account&.id}:#{@status.id}"
       end
     end
   end
@@ -50,7 +55,8 @@ class StatusesController < ApplicationController
                       content_type: 'application/activity+json',
                       serializer: ActivityPub::ActivitySerializer,
                       adapter: ActivityPub::Adapter,
-                      domain: current_account&.domain
+                      domain: current_account&.domain,
+                      key: "statuses/activity:#{current_account&.id}:#{@status.id}"
   end
 
   def embed