Avoid duplicate work by merging ReplyDistributionWorker into DistributionWorker (#9660)
This commit is contained in:
parent
b2f4114550
commit
6fb6a53938
3 changed files with 8 additions and 44 deletions
|
@ -31,7 +31,14 @@ class ActivityPub::DistributionWorker
|
|||
end
|
||||
|
||||
def inboxes
|
||||
@inboxes ||= @account.followers.inboxes
|
||||
# Deliver the status to all followers.
|
||||
# If the status is a reply to another local status, also forward it to that
|
||||
# status' authors' followers.
|
||||
@inboxes ||= if @status.reply? && @status.thread.account.local? && @status.distributable?
|
||||
@account.followers.or(@status.thread.account.followers).inboxes
|
||||
else
|
||||
@account.followers.inboxes
|
||||
end
|
||||
end
|
||||
|
||||
def signed_payload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue