Fix Update/Delete of quoted status not being forwarded to quoters's followers (#36390)
This commit is contained in:
@@ -27,17 +27,25 @@ class ActivityPub::Forwarder
|
||||
@reblogged_by_account_ids ||= @status.reblogs.includes(:account).references(:account).merge(Account.local).pluck(:account_id)
|
||||
end
|
||||
|
||||
def quoted_by_account_ids
|
||||
@quoted_by_account_ids ||= @status.quotes.includes(:account).references(:account).merge(Account.local).pluck(:account_id)
|
||||
end
|
||||
|
||||
def shared_by_account_ids
|
||||
reblogged_by_account_ids.concat(quoted_by_account_ids)
|
||||
end
|
||||
|
||||
def signature_account_id
|
||||
@signature_account_id ||= if in_reply_to_local?
|
||||
in_reply_to.account_id
|
||||
else
|
||||
reblogged_by_account_ids.first
|
||||
shared_by_account_ids.first
|
||||
end
|
||||
end
|
||||
|
||||
def inboxes
|
||||
@inboxes ||= begin
|
||||
arr = inboxes_for_followers_of_reblogged_by_accounts
|
||||
arr = inboxes_for_followers_of_shared_by_accounts
|
||||
arr += inboxes_for_followers_of_replied_to_account if in_reply_to_local?
|
||||
arr -= [@account.preferred_inbox_url]
|
||||
arr.uniq!
|
||||
@@ -45,8 +53,8 @@ class ActivityPub::Forwarder
|
||||
end
|
||||
end
|
||||
|
||||
def inboxes_for_followers_of_reblogged_by_accounts
|
||||
Account.where(id: ::Follow.where(target_account_id: reblogged_by_account_ids).select(:account_id)).inboxes
|
||||
def inboxes_for_followers_of_shared_by_accounts
|
||||
Account.where(id: ::Follow.where(target_account_id: shared_by_account_ids).select(:account_id)).inboxes
|
||||
end
|
||||
|
||||
def inboxes_for_followers_of_replied_to_account
|
||||
|
||||
Reference in New Issue
Block a user