diff --git a/sgx_jmp.rb b/sgx_jmp.rb index 6c5dee843ed89c9cb094776f4e38cdf58431ffcc..32df4997b3b8d58dd7a968485a81d41b9943db46 100644 --- a/sgx_jmp.rb +++ b/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