mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-04 21:08:51 +00:00
JSONify mail parts
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 2007-2013 Inverse inc.
|
||||
Copyright (C) 2007-2015 Inverse inc.
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
|
||||
This file is part of SOGo.
|
||||
@@ -15,7 +15,7 @@
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with OGo; see the file COPYING. If not, write to the
|
||||
License along with SOGo; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA.
|
||||
*/
|
||||
@@ -31,6 +31,8 @@
|
||||
#import <NGExtensions/NSString+Encoding.h>
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
|
||||
#import <SOGo/NSString+Utilities.h>
|
||||
#import <Mailer/NSData+Mail.h>
|
||||
#import <Mailer/NSDictionary+Mail.h>
|
||||
@@ -141,6 +143,21 @@
|
||||
return currentObject;
|
||||
}
|
||||
|
||||
- (id) renderedPart
|
||||
{
|
||||
NSString *type;
|
||||
|
||||
type = [NSString stringWithFormat: @"%@/%@",
|
||||
[bodyInfo objectForKey: @"type"],
|
||||
[bodyInfo objectForKey: @"subtype"]];
|
||||
|
||||
return [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[self className], @"type",
|
||||
type, @"contentType",
|
||||
[[self generateResponse] contentAsString], @"content",
|
||||
nil];
|
||||
}
|
||||
|
||||
- (NSData *) content
|
||||
{
|
||||
return [[self clientObject] fetchBLOB];
|
||||
|
||||
Reference in New Issue
Block a user