]> cat aescling's git repositories - mastodon.git/commitdiff
Do not leak instance-local polls to remote followers
authorThibaut Girka <thib@sitedethib.com>
Mon, 11 Mar 2019 10:25:38 +0000 (11:25 +0100)
committerThibaut Girka <thib@sitedethib.com>
Mon, 11 Mar 2019 12:08:20 +0000 (13:08 +0100)
app/workers/activitypub/distribute_poll_update_worker.rb

index 718279c1ba631496dc0f60fde10594a1686b6201..02da583cd7edff2fe5b59c87bd4e29cb805000f2 100644 (file)
@@ -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]