chore: Stop processing auto-response emails (#9606)

Stop processing auto-response emails
https://www.notion.so/chatwoot/Avoid-Auto-Replies-sorcerer-s-apprentice-mode-55ffb09efbd7451994f1ff852de4c168?pvs=4
This commit is contained in:
Sojan Jose
2024-06-13 14:19:11 -07:00
committed by GitHub
parent 08516e6c43
commit 7968e98529
9 changed files with 1344 additions and 34 deletions

View File

@@ -99,5 +99,17 @@ RSpec.describe MailPresenter do
end
end
end
describe 'auto_reply?' do
let(:auto_reply_mail) { create_inbound_email_from_fixture('auto_reply.eml').mail }
let(:auto_reply_with_auto_submitted_mail) { create_inbound_email_from_fixture('auto_reply_with_auto_submitted.eml').mail }
let(:decorated_auto_reply_mail) { described_class.new(auto_reply_mail) }
let(:decorated_auto_reply_with_auto_submitted_mail) { described_class.new(auto_reply_with_auto_submitted_mail) }
it 'returns true for auto-reply emails' do
expect(decorated_auto_reply_mail.auto_reply?).to be true
expect(decorated_auto_reply_with_auto_submitted_mail.auto_reply?).to be true
end
end
end
end