From 339f78fb63b838b8a20a5aae2c4948667463a6e1 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Fri, 13 Nov 2020 00:46:03 +0100 Subject: [PATCH] Fix media not being marked sensitive when outgoing CW is set Fixes #1461 Fixes a regression from a recent merge --- app/serializers/activitypub/note_serializer.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb index 4ac699ddf3..c4f8f5c3fa 100644 --- a/app/serializers/activitypub/note_serializer.rb +++ b/app/serializers/activitypub/note_serializer.rb @@ -40,10 +40,6 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer object.spoiler_text.presence || (instance_options[:allow_local_only] ? nil : Setting.outgoing_spoilers.presence) end - def sensitive - object.sensitive || (!instance_options[:allow_local_only] && Setting.outgoing_spoilers.present?) - end - def direct_message object.direct_visibility? end @@ -111,7 +107,7 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer end def sensitive - object.account.sensitized? || object.sensitive + object.account.sensitized? || object.sensitive || (!instance_options[:allow_local_only] && Setting.outgoing_spoilers.present?) end def virtual_tags