Add missing content type to mixed part viewer

pull/110/head
Francis Lachapelle 2015-10-06 15:38:37 -04:00
parent 13f4e5a4de
commit ad40bff91f
1 changed files with 5 additions and 0 deletions

View File

@ -87,6 +87,7 @@
id info, viewer; id info, viewer;
NSArray *parts; NSArray *parts;
NSMutableArray *renderedParts; NSMutableArray *renderedParts;
NSString *contentType;
NSUInteger i, max; NSUInteger i, max;
parts = [[self bodyInfo] objectForKey: @"parts"]; parts = [[self bodyInfo] objectForKey: @"parts"];
@ -102,9 +103,13 @@
[viewer setPartPath: [self childPartPath]]; [viewer setPartPath: [self childPartPath]];
[renderedParts addObject: [viewer renderedPart]]; [renderedParts addObject: [viewer renderedPart]];
} }
contentType = [NSString stringWithFormat: @"%@/%@",
[[self bodyInfo] objectForKey: @"type"],
[[self bodyInfo] objectForKey: @"subtype"]];
return [NSDictionary dictionaryWithObjectsAndKeys: return [NSDictionary dictionaryWithObjectsAndKeys:
[self className], @"type", [self className], @"type",
contentType, @"contentType",
renderedParts, @"content", renderedParts, @"content",
nil]; nil];
} }