From 66442caa3ba4e02a3846d6f9e4be7f34f254db3e Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 22 Aug 2007 15:13:06 +0000 Subject: [PATCH] Monotone-Parent: f9ec755c687fa482360d3b88e321382d4f3396f0 Monotone-Revision: d0218fb78b87e5da11e31cb28a9ec3563699c62c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-08-22T15:13:06 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ SoObjects/Mailer/SOGoDraftObject.m | 23 +++++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) 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]; }