about summary refs log tree commit diff
path: root/app/lib/ostatus
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-01-09 19:35:10 +0100
committerGitHub <noreply@github.com>2018-01-09 19:35:10 +0100
commit35b84985a8b9e57cfd3ffac8a0e3937d3c7a1167 (patch)
tree6f2885b2947d2796eed899e0ae9f8820f810b096 /app/lib/ostatus
parentd41f0b66cc9768a0570c54194498a65a0ce0f31c (diff)
Skip ActivityPub Announces of non-public objects (#6230)
* Skip ActivityPub Announces of non-public objects

* Skip OStatus reblogs of non-public statuses
Diffstat (limited to 'app/lib/ostatus')
-rw-r--r--app/lib/ostatus/activity/creation.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/lib/ostatus/activity/creation.rb b/app/lib/ostatus/activity/creation.rb
index f210e134a..b38407cd3 100644
--- a/app/lib/ostatus/activity/creation.rb
+++ b/app/lib/ostatus/activity/creation.rb
@@ -26,6 +26,9 @@ class OStatus::Activity::Creation < OStatus::Activity::Base
     cached_reblog = reblog
     status = nil
 
+    # Skip if the reblogged status is not public
+    return if cached_reblog && !(cached_reblog.public_visibility? || cached_reblog.unlisted_visibility?)
+
     media_attachments = save_media
 
     ApplicationRecord.transaction do