about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-03-28 13:01:33 +0100
committerThibaut Girka <thib@sitedethib.com>2019-03-28 13:01:33 +0100
commit050efbc12650feaac3e833c4dd740bf090e3dae1 (patch)
tree260458c7ff43dd82fc02cc7e5ef0920dd8d2a25b /app/workers
parent0418bdd71f59b4d7e9f3498f2990c8b044f310e1 (diff)
parent24d5b6f9e39d2ac62a9657c7d19bc8c437b0735b (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/workers/activitypub/distribute_poll_update_worker.rb
- config/locales/pl.yml
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/activitypub/distribute_poll_update_worker.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/activitypub/distribute_poll_update_worker.rb b/app/workers/activitypub/distribute_poll_update_worker.rb
index 5536bd744..98b227111 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 if @status.poll.nil? || @status.local_only?
+    return if @status.preloadable_poll.nil? || @status.local_only?
 
     ActivityPub::DeliveryWorker.push_bulk(inboxes) do |inbox_url|
       [payload, @account.id, inbox_url]
@@ -29,7 +29,7 @@ class ActivityPub::DistributePollUpdateWorker
   def inboxes
     return @inboxes if defined?(@inboxes)
 
-    @inboxes = [@status.mentions, @status.reblogs, @status.poll.votes].flat_map do |relation|
+    @inboxes = [@status.mentions, @status.reblogs, @status.preloadable_poll.votes].flat_map do |relation|
       relation.includes(:account).map do |record|
         record.account.preferred_inbox_url if !record.account.local? && record.account.activitypub?
       end