From 62091f53f1960ca964e6ed2fd03901ffbd27d7a9 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Sun, 1 Nov 2020 18:02:40 -0600 Subject: Limit addressing to remote AP followers; remove duplicate follower targets from cc list --- app/lib/activitypub/tag_manager.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/lib') diff --git a/app/lib/activitypub/tag_manager.rb b/app/lib/activitypub/tag_manager.rb index d8b9cd9a9..4b729459f 100644 --- a/app/lib/activitypub/tag_manager.rb +++ b/app/lib/activitypub/tag_manager.rb @@ -73,6 +73,7 @@ class ActivityPub::TagManager account_ids |= status.account.follower_ids if status.private_visibility? accounts = status.account.silenced? ? status.account.followers.where(id: account_ids) : Account.where(id: account_ids) + accounts = accounts.remote.activitypub accounts = accounts.where(domain: target_domain) if target_domain.present? accounts.each_with_object([]) do |account, result| @@ -99,13 +100,13 @@ class ActivityPub::TagManager account_ids = status.active_mentions.pluck(:account_id) when 'private', 'limited' account_ids = status.silent_mentions.pluck(:account_id) - account_ids |= status.account.follower_ids if status.private_visibility? else account_ids = [] end if account_ids.present? accounts = status.account.silenced? ? status.account.followers.where(id: account_ids) : Account.where(id: account_ids) + accounts = accounts.remote.activitypub accounts = accounts.where(domain: target_domain) if target_domain.present? cc.concat(accounts.each_with_object([]) do |account, result| -- cgit