mirror of
https://github.com/mastodon/mastodon.git
synced 2025-11-27 18:10:58 +00:00
Fix forwarder being called with nil status when quote post is soft-deleted (#36463)
This commit is contained in:
parent
fd516347cb
commit
50743cc35b
|
|
@ -59,9 +59,11 @@ class ActivityPub::Activity::Delete < ActivityPub::Activity
|
||||||
@quote = Quote.find_by(approval_uri: object_uri, quoted_account: @account)
|
@quote = Quote.find_by(approval_uri: object_uri, quoted_account: @account)
|
||||||
return if @quote.nil?
|
return if @quote.nil?
|
||||||
|
|
||||||
ActivityPub::Forwarder.new(@account, @json, @quote.status).forward!
|
ActivityPub::Forwarder.new(@account, @json, @quote.status).forward! if @quote.status.present?
|
||||||
|
|
||||||
@quote.reject!
|
@quote.reject!
|
||||||
DistributionWorker.perform_async(@quote.status_id, { 'update' => true })
|
|
||||||
|
DistributionWorker.perform_async(@quote.status_id, { 'update' => true }) if @quote.status.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
def forwarder
|
def forwarder
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user