about summary refs log tree commit diff
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-30 13:54:13 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-30 13:54:13 -0500
commit96770151eff81986dc2ed84d386701e5e443786d (patch)
treed2a2f4ea35b674a2c4882bb824429bb9ba9daa04
parentd51a846d3a1383801711d41740360f8152535395 (diff)
remove auto-rejections from transparancy log
-rw-r--r--app/helpers/autoreject_helper.rb13
1 files changed, 3 insertions, 10 deletions
diff --git a/app/helpers/autoreject_helper.rb b/app/helpers/autoreject_helper.rb
index 1e53f785f..3e1bd57aa 100644
--- a/app/helpers/autoreject_helper.rb
+++ b/app/helpers/autoreject_helper.rb
@@ -1,6 +1,4 @@
 module AutorejectHelper
-  LOG_SCOPE_FEDERATION = ENV.fetch('LOG_SCOPE_FEDERATION', 'federation')
-
 	def should_reject?(uri = nil)
     if uri.nil?
       if @object
@@ -14,8 +12,7 @@ module AutorejectHelper
 
     domain = uri.scan(/[\w\-]+\.[\w\-]+(?:\.[\w\-]+)*/).first
     blocks = DomainBlock.suspend
-    reason = ((@json && @json['type'] == 'Announce') ? :domain_boost : :domain)
-    return reason if blocks.where(domain: domain).or(blocks.where('domain LIKE ?', "%.#{domain}")).exists?
+    return :domain if blocks.where(domain: domain).or(blocks.where('domain LIKE ?', "%.#{domain}")).exists?
 
     return unless @json || @object
 
@@ -63,8 +60,6 @@ module AutorejectHelper
     case reason
     when :domain
       "the origin domain is blocked"
-    when :domain_boost
-      "the origin domain of the object being boosted is blocked"
     when :id_starts_with
       "the object's URI starts with a blocked phrase"
     when :id_contains
@@ -92,11 +87,9 @@ module AutorejectHelper
     if reason
       reason = reject_reason(reason)
       if @json
-        Rails.logger.info("Auto-rejected #{@json['id']} (#{@json['type']})")
-        LogWorker.perform_async("\xf0\x9f\x9a\xab Auto-rejected an incoming '#{@json['type']}#{@object && " #{@object['type']}".rstrip}' from #{@json['id']} because #{reason}.", LOG_SCOPE_FEDERATION)
+        Rails.logger.info("Rejected an incoming '#{@json['type']}#{@object && " #{@object['type']}".rstrip}' from #{@json['id']} because #{reason}.")
       elsif uri
-        Rails.logger.info("Auto-rejected #{uri}")
-        LogWorker.perform_async("\xf0\x9f\x9a\xab Auto-rejected a request to #{uri} because #{reason}.", LOG_SCOPE_FEDERATION)
+        Rails.logger.info("Rejected an outgoing request to #{uri} because #{reason}.")
       end
       return true
     end