Project

General

Profile

Defect #15999 » x-autoreply.diff

Skip 'X-Autoreply: yes' emails - Karel Pičman, 2014-11-12 14:41

View differences:

app/models/mail_handler.rb (working copy)
74 74
  cattr_accessor :ignored_emails_headers
75 75
  @@ignored_emails_headers = {
76 76
    'X-Auto-Response-Suppress' => 'oof',
77
    'Auto-Submitted' => /\Aauto-(replied|generated)/
77
    'Auto-Submitted' => /\Aauto-(replied|generated)/,
78
    'X-Autoreply' => 'yes'
78 79
  }
79 80

  
80 81
  # Processes incoming emails
test/unit/mail_handler_test.rb (working copy)
620 620
      "X-Auto-Response-Suppress: OOF",
621 621
      "Auto-Submitted: auto-replied",
622 622
      "Auto-Submitted: Auto-Replied",
623
      "Auto-Submitted: auto-generated"
623
      "Auto-Submitted: auto-generated",
624
      'X-Autoreply: yes'
624 625
    ].each do |header|
625 626
      raw = IO.read(File.join(FIXTURES_PATH, 'ticket_on_given_project.eml'))
626 627
      raw = header + "\n" + raw
    (1-1/1)