Merge remote-tracking branch 'parent/main' into upstream-20240115
This commit is contained in:
commit
673e09d645
338 changed files with 1095 additions and 540 deletions
|
@ -320,6 +320,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|||
RedownloadMediaWorker.perform_in(rand(30..600).seconds, media_attachment.id)
|
||||
rescue Seahorse::Client::NetworkingError => e
|
||||
Rails.logger.warn "Error storing media attachment: #{e}"
|
||||
RedownloadMediaWorker.perform_async(media_attachment.id)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -38,15 +38,10 @@ class StatusReachFinder
|
|||
private
|
||||
|
||||
def reached_account_inboxes
|
||||
# When the status is a reblog, there are no interactions with it
|
||||
# directly, we assume all interactions are with the original one
|
||||
|
||||
if @status.reblog?
|
||||
[]
|
||||
elsif @status.limited_visibility?
|
||||
if @status.limited_visibility?
|
||||
Account.where(id: mentioned_account_ids).where.not(domain: banned_domains).inboxes
|
||||
else
|
||||
Account.where(id: reached_account_ids).where.not(domain: banned_domains + friend_domains).inboxes
|
||||
Account.where(id: reached_account_ids).inboxes
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -67,18 +62,25 @@ class StatusReachFinder
|
|||
end
|
||||
|
||||
def reached_account_ids
|
||||
[
|
||||
replied_to_account_id,
|
||||
reblog_of_account_id,
|
||||
mentioned_account_ids,
|
||||
reblogs_account_ids,
|
||||
favourites_account_ids,
|
||||
replies_account_ids,
|
||||
quoted_account_id,
|
||||
].tap do |arr|
|
||||
arr.flatten!
|
||||
arr.compact!
|
||||
arr.uniq!
|
||||
# When the status is a reblog, there are no interactions with it
|
||||
# directly, we assume all interactions are with the original one
|
||||
|
||||
if @status.reblog?
|
||||
[reblog_of_account_id]
|
||||
else
|
||||
[
|
||||
replied_to_account_id,
|
||||
reblog_of_account_id,
|
||||
mentioned_account_ids,
|
||||
reblogs_account_ids,
|
||||
favourites_account_ids,
|
||||
replies_account_ids,
|
||||
quoted_account_id,
|
||||
].tap do |arr|
|
||||
arr.flatten!
|
||||
arr.compact!
|
||||
arr.uniq!
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue