diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-10-12 22:05:06 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-10-12 22:05:06 -0500 |
commit | a367ff86982987aa0573d9b375000a909223c3ad (patch) | |
tree | 0d9a8560aba33efdf2dbc98398a3df72ecd56781 /app/services | |
parent | bc04de8eed0cf0451018f3182af0a24754444f86 (diff) |
graylist (reject unknown) federation & known account auto-learning finally have toggle switches in site settings
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/activitypub/process_account_service.rb | 2 | ||||
-rw-r--r-- | app/services/favourite_service.rb | 2 | ||||
-rw-r--r-- | app/services/follow_service.rb | 2 | ||||
-rw-r--r-- | app/services/post_status_service.rb | 2 | ||||
-rw-r--r-- | app/services/reblog_service.rb | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb index c1c643ff0..a1d508405 100644 --- a/app/services/activitypub/process_account_service.rb +++ b/app/services/activitypub/process_account_service.rb @@ -23,7 +23,7 @@ class ActivityPub::ProcessAccountService < BaseService is_new_account = @account.nil? if is_new_account - set_reject_unknown_policy + set_reject_unknown_policy if Setting.auto_reject_unknown create_account end update_account diff --git a/app/services/favourite_service.rb b/app/services/favourite_service.rb index cff4c37e0..788b3a620 100644 --- a/app/services/favourite_service.rb +++ b/app/services/favourite_service.rb @@ -16,7 +16,7 @@ class FavouriteService < BaseService favourite = Favourite.create!(account: account, status: status) - status.account.mark_known! unless status.account.known? + status.account.mark_known! unless !Setting.auto_mark_known || status.account.known? curate_status(status) create_notification(favourite) unless skip_notify diff --git a/app/services/follow_service.rb b/app/services/follow_service.rb index 776c4cb9b..1653253f5 100644 --- a/app/services/follow_service.rb +++ b/app/services/follow_service.rb @@ -14,7 +14,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 target_account.known? + target_account.mark_known! unless !Setting.auto_mark_known || target_account.known? if source_account.following?(target_account) # We're already following this account, but we'll call follow! again to diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index e7c81309f..353c1ef82 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -95,7 +95,7 @@ class PostStatusService < BaseService end def mark_recipient_known - @in_reply_to.account.mark_known! unless @in_reply_to.account.known? + @in_reply_to.account.mark_known! unless !Setting.auto_mark_known || @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 1e7d4f3ca..4e63caef8 100644 --- a/app/services/reblog_service.rb +++ b/app/services/reblog_service.rb @@ -17,7 +17,7 @@ class ReblogService < BaseService new_reblog = reblog.nil? if new_reblog - reblogged_status.account.mark_known! unless reblogged_status.account.known? + reblogged_status.account.mark_known! unless !Setting.auto_mark_known || reblogged_status.account.known? visibility = options[:visibility] || account.user&.setting_default_privacy visibility = reblogged_status.visibility if reblogged_status.hidden? |