about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-11-24 12:33:24 -0600
committerFire Demon <firedemon@creature.cafe>2020-11-24 12:33:24 -0600
commit74bb8ffdfd368e518ef18dcb1bdb56121c0d4cc4 (patch)
tree95824f5dae3fac81516586cb1d6d0d782274fd74 /app/lib
parent69fa4f7d4f3c435018c1e7cb9e6a0fcb5b233695 (diff)
Add missing sensitization checks
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/activitypub/activity/create.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb
index 3053b1bb3..c9bb1b2f7 100644
--- a/app/lib/activitypub/activity/create.rb
+++ b/app/lib/activitypub/activity/create.rb
@@ -151,7 +151,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
         language: detected_language,
         spoiler_text: converted_object_type? ? '' : (text_from_summary || ''),
         title: text_from_title,
-        sensitive: @object['sensitive'] || false,
+        sensitive: @account.sensitized? || @object['sensitive'] || false,
         visibility: visibility_from_audience,
         expires_at: @object['expires'],
         media_attachment_ids: process_attachments.take(4).map(&:id),
@@ -173,7 +173,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
         created_at: @object['published'],
         override_timestamps: @options[:override_timestamps],
         reply: @object['inReplyTo'].present?,
-        sensitive: @object['sensitive'] || false,
+        sensitive: @account.sensitized? || @object['sensitive'] || false,
         visibility: visibility_from_audience,
         thread: replied_to_status,
       }
@@ -187,7 +187,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
         language: detected_language,
         spoiler_text: converted_object_type? ? '' : (text_from_summary || ''),
         title: text_from_title,
-        sensitive: @object['sensitive'] || false,
+        sensitive: @account.sensitized? || @object['sensitive'] || false,
         visibility: visibility_from_audience,
       }
     end