From ddcd9fe9f0e85b1db12ae584749e680146611f9a Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sat, 30 May 2020 16:56:23 +0200 Subject: [PATCH] Fix backup archive including outgoing-only content warnings --- app/serializers/activitypub/note_serializer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb index 96e94d7972b..e2d2b6bec3f 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