From 401f44b19bbe9defca7623fdf5436b94d06def83 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Tue, 4 Nov 2014 15:16:01 +0000 Subject: Add fix for Apple Mail with attachments --- app/models/incoming_message.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/models/incoming_message.rb') diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 135a6bdaf..db6722976 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -693,8 +693,10 @@ class IncomingMessage < ActiveRecord::Base self.reload # get the main body part from the set of attachments we just created, - # not from the self.foi_attachments association - some of the total set of - # self.foi_attachments may now be obsolete + # not from the self.foi_attachments association - some of the total set + # of self.foi_attachments may now be obsolete. Sometimes (e.g. when + # parsing mail from Apple Mail) we can end up with less attachments + # because the hexdigest of an attachment is identical. main_part = get_main_body_text_part(attachments) # we don't use get_main_body_text_internal, as we want to avoid charset # conversions, since /usr/bin/uudecode needs to deal with those. -- cgit v1.2.3