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.
This commit is contained in:
JKillian 2014-10-22 15:22:04 -04:00
parent 5de43930e9
commit d872d0f78a
1 changed files with 1 additions and 1 deletions

View File

@ -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)