Monotone-Parent: d0218fb78b87e5da11e31cb28a9ec3563699c62c

Monotone-Revision: 5efb21ecdb824936262ea685cfa5c21f94b0a7a3

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-08-22T15:14:06
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2007-08-22 15:14:06 +00:00
parent 66442caa3b
commit f0b3c14386
3 changed files with 27 additions and 0 deletions

View File

@ -1,5 +1,10 @@
2007-08-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Mailer/SOGoMailObject+Draft.m ([SOGoMailObject
-contentForInlineForward]): new method that returns the content of
the message for inline forwarding based on the SOGoMailForward
templates.
* SoObjects/Mailer/SOGoDraftObject.m ([SOGoDraftObject
-fetchMailForForwarding:sourceMail]): check the user preference
for message forwarding and compose inline forwarded messages if required.

View File

@ -35,6 +35,7 @@
- (NSString *) subjectForForward;
- (NSString *) filenameForForward;
- (NSString *) contentForInlineForward;
@end

View File

@ -22,9 +22,14 @@
#import <Foundation/NSArray.h>
#import <NGObjWeb/WOApplication.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGExtensions/NSString+misc.h>
#import <NGExtensions/NSObject+Logs.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import "SOGoMailForward.h"
#import "SOGoMailObject+Draft.h"
#define maxFilenameLength 64
@ -207,6 +212,22 @@
return newSubject;
}
- (NSString *) contentForInlineForward
{
SOGoUser *currentUser;
NSString *pageName;
SOGoMailForward *page;
currentUser = [context activeUser];
pageName = [NSString stringWithFormat: @"SOGoMail%@Forward",
[currentUser language]];
page = [[WOApplication application] pageWithName: pageName
inContext: context];
[page setForwardedMail: self];
return [[page generateResponse] contentAsString];
}
- (void) _fetchFileAttachmentKey: (NSDictionary *) part
intoArray: (NSMutableArray *) keys
withPath: (NSString *) path