about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-03-11 11:25:38 +0100
committerThibaut Girka <thib@sitedethib.com>2019-03-11 13:08:20 +0100
commit7d026aa07927a8960a573350a1aa2a538ef938f3 (patch)
tree56ee6987eb41561ab03efbea15495ad8174fb0d1
parent89bee860cdae399b796814f80a48eafa8b838d92 (diff)
Do not leak instance-local polls to remote followers
-rw-r--r--app/workers/activitypub/distribute_poll_update_worker.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/workers/activitypub/distribute_poll_update_worker.rb b/app/workers/activitypub/distribute_poll_update_worker.rb
index 718279c1b..02da583cd 100644
--- a/app/workers/activitypub/distribute_poll_update_worker.rb
+++ b/app/workers/activitypub/distribute_poll_update_worker.rb
@@ -9,7 +9,7 @@ class ActivityPub::DistributePollUpdateWorker
     @status  = Status.find(status_id)
     @account = @status.account
 
-    return unless @status.poll
+    return if @status.poll.nil? || @status.local_only?
 
     ActivityPub::DeliveryWorker.push_bulk(inboxes) do |inbox_url|
       [payload, @account.id, inbox_url]