0
0
Fork 0

Fix duplicate reports being sent when reporting some remote posts (#27355)

This commit is contained in:
Claire 2023-10-10 16:00:50 +02:00 committed by GitHub
parent 9d1c3d0678
commit 27e84c0691
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 2 deletions

View file

@ -57,7 +57,7 @@ class ReportService < BaseService
def forward_to_replied_to!
# Send report to servers to which the account was replying to, so they also have a chance to act
inbox_urls = Account.remote.where(domain: forward_to_domains).where(id: Status.where(id: reported_status_ids).where.not(in_reply_to_account_id: nil).select(:in_reply_to_account_id)).inboxes - [@target_account.inbox_url]
inbox_urls = Account.remote.where(domain: forward_to_domains).where(id: Status.where(id: reported_status_ids).where.not(in_reply_to_account_id: nil).select(:in_reply_to_account_id)).inboxes - [@target_account.inbox_url, @target_account.shared_inbox_url]
inbox_urls.each do |inbox_url|
ActivityPub::DeliveryWorker.perform_async(payload, some_local_account.id, inbox_url)