about summary refs log tree commit diff
path: root/app/lib/activitypub/activity/update.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-03-28 04:44:59 +0100
committerGitHub <noreply@github.com>2019-03-28 04:44:59 +0100
commitf1bc90ab508cbdebc646324f87db48a9e80036f4 (patch)
treec9e6fff16d8e69ed99e7010cabd4d83d595e5493 /app/lib/activitypub/activity/update.rb
parentf46f67d984e4e2deb4bf98cd5c5de813caf66eca (diff)
Rename :poll to :preloadable_poll and :owned_poll to :poll on Status (#10401)
Also, fix some n+1 queries

Resolve #10365
Diffstat (limited to 'app/lib/activitypub/activity/update.rb')
-rw-r--r--app/lib/activitypub/activity/update.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/activitypub/activity/update.rb b/app/lib/activitypub/activity/update.rb
index bc9a63f98..70035325b 100644
--- a/app/lib/activitypub/activity/update.rb
+++ b/app/lib/activitypub/activity/update.rb
@@ -23,8 +23,8 @@ class ActivityPub::Activity::Update < ActivityPub::Activity
     return reject_payload! if invalid_origin?(@object['id'])
 
     status = Status.find_by(uri: object_uri, account_id: @account.id)
-    return if status.nil? || status.poll.nil?
+    return if status.nil? || status.preloadable_poll.nil?
 
-    ActivityPub::ProcessPollService.new.call(status.poll, @object)
+    ActivityPub::ProcessPollService.new.call(status.preloadable_poll, @object)
   end
 end