diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-11-13 00:46:03 +0100 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2020-11-13 01:05:55 +0100 |
commit | 339f78fb63b838b8a20a5aae2c4948667463a6e1 (patch) | |
tree | 1af4ae3d2a2c1764d230752568d931f9d663cd0a /app/serializers/activitypub | |
parent | 265b26489a9214a6c98a4dfa88f08ce490211ebc (diff) |
Fix media not being marked sensitive when outgoing CW is set
Fixes #1461 Fixes a regression from a recent merge
Diffstat (limited to 'app/serializers/activitypub')
-rw-r--r-- | app/serializers/activitypub/note_serializer.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb index 4ac699ddf..c4f8f5c3f 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 |