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; }