forked from treehouse/mastodon
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.rebase/4.0.0rc2
parent
629fae8b3b
commit
0698c610a6
|
@ -7,9 +7,9 @@ class ActivityPub::ReplyDistributionWorker
|
||||||
|
|
||||||
def perform(status_id)
|
def perform(status_id)
|
||||||
@status = Status.find(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|
|
ActivityPub::DeliveryWorker.push_bulk(inboxes) do |inbox_url|
|
||||||
[signed_payload, @status.account_id, inbox_url]
|
[signed_payload, @status.account_id, inbox_url]
|
||||||
|
|
Loading…
Reference in New Issue