diff --git a/ChangeLog b/ChangeLog index 533045eb3..91a2e9292 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-08-22 Wolfgang Sourdeau + * SoObjects/Mailer/SOGoDraftObject.m ([SOGoDraftObject + -fetchMailForForwarding:sourceMail]): check the user preference + for message forwarding and compose inline forwarded messages if required. + * SoObjects/Appointments/SOGoCalendarComponent.m ([SOGoCalendarComponent -sendEMailUsingTemplateNamed:_pageNameforOldObject:_oldObjectandNewObject:_newObjecttoAttendees:_attendees]): diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index 55b98302f..6c49beb97 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -29,7 +29,7 @@ #import #import -#import +#import #import #import #import @@ -54,6 +54,7 @@ #import #import #import +#import #import "SOGoMailAccount.h" #import "SOGoMailFolder.h" #import "SOGoMailObject.h" @@ -517,6 +518,7 @@ static BOOL showTextAttachmentsInline = NO; - (void) fetchMailForForwarding: (SOGoMailObject *) sourceMail { NSDictionary *info, *attachment; + SOGoUser *currentUser; [sourceMail fetchCoreInfos]; @@ -527,15 +529,20 @@ static BOOL showTextAttachmentsInline = NO; [self setSourceFlag: @"$Forwarded"]; /* attach message */ - + currentUser = [context activeUser]; + if ([[currentUser messageForwarding] isEqualToString: @"inline"]) + [self setText: [sourceMail contentForInlineForward]]; + else + { // TODO: use subject for filename? // error = [newDraft saveAttachment:content withName:@"forward.mail"]; - attachment = [NSDictionary dictionaryWithObjectsAndKeys: - [sourceMail filenameForForward], @"filename", - @"message/rfc822", @"mime-type", - nil]; - [self saveAttachment: [sourceMail content] - withMetadata: attachment]; + attachment = [NSDictionary dictionaryWithObjectsAndKeys: + [sourceMail filenameForForward], @"filename", + @"message/rfc822", @"mime-type", + nil]; + [self saveAttachment: [sourceMail content] + withMetadata: attachment]; + } [self storeInfo]; }