mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-28 05:14:18 +00:00
@@ -840,6 +840,7 @@ static BOOL debugSoParts = NO;
|
||||
path, @"path",
|
||||
[part objectForKey: @"encoding"], @"encoding",
|
||||
[part objectForKey:@ "size"], @"size",
|
||||
[part objectForKey: @"bodyId"], @"bodyId",
|
||||
[NSString stringWithFormat: @"%@/%@", prefix, filenameURL], @"url",
|
||||
[NSString stringWithFormat: @"%@/asAttachment/%@", prefix, filenameURL], @"urlAsAttachment",
|
||||
nil];
|
||||
|
||||
@@ -609,7 +609,8 @@ static NSData* _sanitizeContent(NSData *theData)
|
||||
value = [_attributes valueAtIndex: count];
|
||||
if ([value hasPrefix: @"cid:"])
|
||||
{
|
||||
cid = [value substringFromIndex: 4];
|
||||
cid = [NSString stringWithFormat: @"<%@>",
|
||||
[value substringFromIndex: 4]];
|
||||
value = [attachmentIds objectForKey: cid];
|
||||
skipAttribute = (value == nil);
|
||||
}
|
||||
|
||||
@@ -215,6 +215,7 @@ static NSString *mailETag = nil;
|
||||
|
||||
NSMutableDictionary *attachmentIds;
|
||||
NSDictionary *attributes;
|
||||
NSString *filename;
|
||||
unsigned int count, max;
|
||||
|
||||
max = [[self attachmentAttrs] count];
|
||||
@@ -222,8 +223,12 @@ static NSString *mailETag = nil;
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
attributes = [[self attachmentAttrs] objectAtIndex: count];
|
||||
filename = [NSString stringWithFormat: @"<%@>", [attributes objectForKey: @"filename"]];
|
||||
[attachmentIds setObject: [attributes objectForKey: @"url"]
|
||||
forKey: [attributes objectForKey: @"filename"]];
|
||||
forKey: filename];
|
||||
if ([[attributes objectForKey: @"bodyId"] length])
|
||||
[attachmentIds setObject: [attributes objectForKey: @"url"]
|
||||
forKey: [attributes objectForKey: @"bodyId"]];
|
||||
}
|
||||
[viewer setAttachmentIds: attachmentIds];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user