about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-02-14 17:37:31 -0600
committermultiple creatures <dev@multiple-creature.party>2020-02-14 17:37:31 -0600
commit92847646cff1effdf42eaa0819d836a663d428c4 (patch)
tree057d47ae953ec2102b65f25345663796a8bed1dc /app/services
parent4f7e76a1308cc35f97f47a9f42c197aeca9ee2de (diff)
add options to let admins customize how trusting or strict graylist federation should be
Diffstat (limited to 'app/services')
-rw-r--r--app/services/favourite_service.rb1
-rw-r--r--app/services/follow_service.rb2
-rw-r--r--app/services/post_status_service.rb2
-rw-r--r--app/services/reblog_service.rb2
4 files changed, 4 insertions, 3 deletions
diff --git a/app/services/favourite_service.rb b/app/services/favourite_service.rb
index 9ab628fb0..aeac9728b 100644
--- a/app/services/favourite_service.rb
+++ b/app/services/favourite_service.rb
@@ -15,6 +15,7 @@ class FavouriteService < BaseService
 
     return favourite unless favourite.nil?
 
+    account.mark_known! unless !Setting.auto_mark_known || !Setting.mark_known_from_favourites || account.known?
     favourite = Favourite.create!(account: account, status: status)
 
     curate_status(status)
diff --git a/app/services/follow_service.rb b/app/services/follow_service.rb
index 7b714bfb2..1d9f1c726 100644
--- a/app/services/follow_service.rb
+++ b/app/services/follow_service.rb
@@ -15,7 +15,7 @@ class FollowService < BaseService
     raise ActiveRecord::RecordNotFound if target_account.nil? || target_account.id == source_account.id || target_account.suspended?
     raise Mastodon::NotPermittedError  if target_account.blocking?(source_account) || source_account.blocking?(target_account) || target_account.moved?
 
-    target_account.mark_known! unless !Setting.auto_mark_known || target_account.known?
+    target_account.mark_known! unless !Setting.auto_mark_known || !Setting.mark_known_from_follows || target_account.known?
 
     SyncRemoteAccountWorker.perform_async(target_account.id) unless target_account.local? || target_account.passive_relationships.exists?
 
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb
index 274c2c297..3505dc536 100644
--- a/app/services/post_status_service.rb
+++ b/app/services/post_status_service.rb
@@ -102,7 +102,7 @@ class PostStatusService < BaseService
   end
 
   def mark_recipient_known
-    @in_reply_to.account.mark_known! unless !Setting.auto_mark_known || @in_reply_to.account.known?
+    @in_reply_to.account.mark_known! unless !Setting.auto_mark_known || !Setting.mark_known_from_mentions || @in_reply_to.account.known?
   end
 
   def set_footer_from_i_am
diff --git a/app/services/reblog_service.rb b/app/services/reblog_service.rb
index 29dcbaf7c..4b7002fca 100644
--- a/app/services/reblog_service.rb
+++ b/app/services/reblog_service.rb
@@ -18,7 +18,7 @@ class ReblogService < BaseService
     new_reblog = reblog.nil?
 
     if new_reblog
-      reblogged_status.account.mark_known! unless !Setting.auto_mark_known || reblogged_status.account.known?
+      reblogged_status.account.mark_known! unless !Setting.auto_mark_known || !Setting.mark_known_from_boosts || reblogged_status.account.known?
       reblogged_status.touch if reblogged_status.account.id == account.id
 
       visibility = options[:visibility] || account.user&.setting_default_privacy