about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-11-01 18:02:40 -0600
committerFire Demon <firedemon@creature.cafe>2020-11-01 18:02:40 -0600
commit62091f53f1960ca964e6ed2fd03901ffbd27d7a9 (patch)
treea5033731353fde16030a8395fbdebeaed374c3e0 /app/lib
parent5fb425175188dd6b678bbf176d418c4895ef008c (diff)
Limit addressing to remote AP followers; remove duplicate follower targets from cc list
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/activitypub/tag_manager.rb3
1 files changed, 2 insertions, 1 deletions
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|