about summary refs log tree commit diff
path: root/app/serializers/activitypub/note_serializer.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-05-30 16:56:23 +0200
committerThibG <thib@sitedethib.com>2020-05-30 18:27:00 +0200
commitddcd9fe9f0e85b1db12ae584749e680146611f9a (patch)
tree09a7fb4db4c2a6e7177382bb630f81f9965ca143 /app/serializers/activitypub/note_serializer.rb
parent9e04b9d8dfc57304e9c409e2bc20d838d673d432 (diff)
Fix backup archive including outgoing-only content warnings
Diffstat (limited to 'app/serializers/activitypub/note_serializer.rb')
-rw-r--r--app/serializers/activitypub/note_serializer.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb
index 96e94d797..e2d2b6bec 100644
--- a/app/serializers/activitypub/note_serializer.rb
+++ b/app/serializers/activitypub/note_serializer.rb
@@ -35,11 +35,11 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
   end
 
   def summary
-    object.spoiler_text.presence || Setting.outgoing_spoilers.presence
+    object.spoiler_text.presence || (instance_options[:allow_local_only] ? nil : Setting.outgoing_spoilers.presence)
   end
 
   def sensitive
-    object.sensitive || Setting.outgoing_spoilers.present?
+    object.sensitive || (!instance_options[:allow_local_only] && Setting.outgoing_spoilers.present?)
   end
 
   def content