2
0

Fix Update/Delete of quoted status not being forwarded to quoters's followers (#36390)

This commit is contained in:
Claire
2025-10-08 14:56:32 +02:00
committed by GitHub
parent d8f0326b02
commit 0be0a8898a
2 changed files with 73 additions and 4 deletions

View File

@@ -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