diff options
author | ThibG <thib@sitedethib.com> | 2019-03-28 15:12:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-28 15:12:33 +0100 |
commit | bb316faffff7a76bc89f7e942233f0e14caf60f5 (patch) | |
tree | 260458c7ff43dd82fc02cc7e5ef0920dd8d2a25b /app/workers | |
parent | 0418bdd71f59b4d7e9f3498f2990c8b044f310e1 (diff) | |
parent | 050efbc12650feaac3e833c4dd740bf090e3dae1 (diff) |
Merge pull request #970 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/activitypub/distribute_poll_update_worker.rb | 4 |
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 |