From bad7450a84eb79505cfe817d59d4d4b5573eb7e1 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 17 Sep 2008 15:28:12 +0000 Subject: [PATCH] Monotone-Parent: ec5101d79c0732e3dfb2e3bf005b356548c65d58 Monotone-Revision: 18351673f3b02540c95a8695b70dd0067da408d5 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-09-17T15:28:12 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ SoObjects/Mailer/SOGoMailObject.m | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 373b6b5e9..1b9f39cc1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-17 Wolfgang Sourdeau + + * SoObjects/Mailer/SOGoMailObject.m ([SOGoMailObject + -fetchAttachmentIds]): if the parts have no filename associated + with them, we still return the prefix url so that we still can + access the attachment from HTML messages. + 2008-09-11 Wolfgang Sourdeau * UI/MainUI/SOGoUserHomePage.m ([SOGoUserHomePage -logoffAction]): diff --git a/SoObjects/Mailer/SOGoMailObject.m b/SoObjects/Mailer/SOGoMailObject.m index d1493a505..157558216 100644 --- a/SoObjects/Mailer/SOGoMailObject.m +++ b/SoObjects/Mailer/SOGoMailObject.m @@ -663,7 +663,7 @@ static BOOL debugSoParts = NO; if ([filename length]) urlToPart = [NSString stringWithFormat: @"%@/%@", urlPrefix, filename]; else - urlToPart = nil; + urlToPart = urlPrefix; return urlToPart; } @@ -700,13 +700,17 @@ static BOOL debugSoParts = NO; - (NSDictionary *) fetchAttachmentIds { NSMutableDictionary *attachmentIds; + NSString *prefix; attachmentIds = [NSMutableDictionary dictionary]; [self fetchCoreInfos]; + prefix = [[self soURL] absoluteString]; + if ([prefix hasSuffix: @"/"]) + prefix = [prefix substringToIndex: [prefix length] - 1]; [self _feedAttachmentIds: attachmentIds withInfos: [coreInfos objectForKey: @"body"] - andPrefix: [[self soURL] absoluteString]]; + andPrefix: prefix]; return attachmentIds; }