diff --git a/lib/model_patches.rb b/lib/model_patches.rb index c00a5317..6787c936 100644 --- a/lib/model_patches.rb +++ b/lib/model_patches.rb @@ -86,6 +86,18 @@ def is_school? end end + RawEmail.class_eval do + alias original_data data + + def data + original_data.sub(/ + ^(Date: [^\n]+\n) + \s+(To: [^\n]+\n) + \s+(From: [^\n]+) + /x, '\1\2\3') + end + end + ReplyToAddressValidator.invalid_reply_addresses = %w( FOIResponses@homeoffice.gsi.gov.uk FOIResponses@homeoffice.gov.uk