No more spam cooldown

Stephen Paul Weber created

Since "spam" is a false positive so often at this point

Change summary

sgx_jmp.rb | 17 -----------------
1 file changed, 17 deletions(-)

Detailed changes

sgx_jmp.rb 🔗

@@ -265,12 +265,6 @@ before(
 	from: /(\A|@)#{FROM_BACKEND}(\/|\Z)/
 ) { |iq| halt if IQ_MANAGER.fulfill(iq) }
 
-SPAM_ERRS = [
-	"rejected-spam-detected",
-	"destination-spam-detected",
-	"destination-rejected-due-to-spam-detection"
-].freeze
-
 before nil, to: /\Acustomer_/, from: /(\A|@)#{FROM_BACKEND}(\/|\Z)/ do |s|
 	StatsD.increment("stanza_customer")
 
@@ -278,17 +272,6 @@ before nil, to: /\Acustomer_/, from: /(\A|@)#{FROM_BACKEND}(\/|\Z)/ do |s|
 	CustomerRepo.new(set_user: Sentry.method(:set_user)).find(
 		s.to.node.delete_prefix("customer_")
 	).then do |customer|
-		if s.is_a?(Blather::Stanza::Message) && s.error?
-			err = Blather::StanzaError.import(s).text
-			if SPAM_ERRS.include?(err)
-				REDIS.setex(
-					"jmp_customer_spam_detected-#{customer.customer_id}",
-					5 * 60,
-					err
-				)
-			end
-		end
-
 		ReachabilityRepo::SMS.new
 			.find(customer, s.from.node, stanza: s).then do |reach|
 				reach.filter do