From d872d0f78a8c314e8c8d16f6f14fd6f0b468f14b Mon Sep 17 00:00:00 2001 From: JKillian Date: Wed, 22 Oct 2014 15:22:04 -0400 Subject: [PATCH] Add additional fields that indicate reply When scanning for where a reply starts, three lines in a row matching common email reply headers indicate the start of a reply. Add 'Cc', 'Bcc', and 'Date' because these are also common. --- lib/email/receiver.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/email/receiver.rb b/lib/email/receiver.rb index 4ca8032cf21..f9d508bd04a 100644 --- a/lib/email/receiver.rb +++ b/lib/email/receiver.rb @@ -147,7 +147,7 @@ module Email end end - REPLYING_HEADER_LABELS = ['From', 'Sent', 'To', 'Subject', 'Reply To'] + REPLYING_HEADER_LABELS = ['From', 'Sent', 'To', 'Subject', 'Reply To', 'Cc', 'Bcc', 'Date'] REPLYING_HEADER_REGEX = Regexp.union(REPLYING_HEADER_LABELS.map { |lbl| "#{lbl}:" }) def discourse_email_trimmer(body)