mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-04 19:15:27 +00:00
(fix) remaining S/MIME fixes to handle image/CIDs in HTML mails
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* NSObject+Utilities.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2015 Inverse inc.
|
||||
* Copyright (C) 2007-2017 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#import <DOM/DOMProtocols.h>
|
||||
|
||||
@class NSArray;
|
||||
@class NSString;
|
||||
@class WOContext;
|
||||
|
||||
@@ -39,6 +40,8 @@
|
||||
|
||||
+ (void) memoryStatistics;
|
||||
|
||||
- (NSArray *) parts;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* NSOBJECT+UTILITIES_H */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* NSObject+Utilities.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2015 Inverse inc.
|
||||
* Copyright (C) 2007-2018 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -24,6 +24,9 @@
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
|
||||
#import <NGMime/NGMimeBodyPart.h>
|
||||
#import <NGMime/NGMimeMultipartBody.h>
|
||||
|
||||
#import "NSDictionary+Utilities.h"
|
||||
#import "SOGoUser.h"
|
||||
#import "SOGoUserDefaults.h"
|
||||
@@ -147,4 +150,20 @@
|
||||
printf("Done!\n");
|
||||
}
|
||||
|
||||
//
|
||||
// Small hack to avoid SOPE's stupid behavior to wrap a multipart
|
||||
// object in a NGMimeBodyPart.
|
||||
//
|
||||
- (NSArray *) parts
|
||||
{
|
||||
if ([self isKindOfClass: [NGMimeMultipartBody class]])
|
||||
return [self parts];
|
||||
|
||||
if ([self isKindOfClass: [NGMimeBodyPart class]] &&
|
||||
[[(id)self body] isKindOfClass: [NGMimeMultipartBody class]])
|
||||
return [[(id)self body] parts];
|
||||
|
||||
return [NSArray array];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user