about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2017-09-17 01:18:00 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-09-16 18:18:00 +0200
commit0698c610a6270f2c184dd97534afb0359cd23994 (patch)
treed91d613afcf5388ba21c6a024a19de9737bc8df0 /app/workers
parent629fae8b3be3a04d5190a9048f0aa5a15bd17828 (diff)
Fix an error in ReplyDistributionWorker when replied status was deleted (#4974)
Reply distribution is proceed by Sidekiq, so replied status may be deleted before this.
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/activitypub/reply_distribution_worker.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/activitypub/reply_distribution_worker.rb b/app/workers/activitypub/reply_distribution_worker.rb
index f9127340f..fe99fc05f 100644
--- a/app/workers/activitypub/reply_distribution_worker.rb
+++ b/app/workers/activitypub/reply_distribution_worker.rb
@@ -7,9 +7,9 @@ class ActivityPub::ReplyDistributionWorker
 
   def perform(status_id)
     @status  = Status.find(status_id)
-    @account = @status.thread.account
+    @account = @status.thread&.account
 
-    return if skip_distribution?
+    return if @account.nil? || skip_distribution?
 
     ActivityPub::DeliveryWorker.push_bulk(inboxes) do |inbox_url|
       [signed_payload, @status.account_id, inbox_url]