mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-10 15:58:52 +00:00
Improvements over 491d7aaffc
This commit is contained in:
@@ -224,9 +224,17 @@ struct GlobalObjectId {
|
||||
|
||||
while ((key = [e nextObject]))
|
||||
{
|
||||
// don't use body parts from a nested body - e.g. body of type message/rfc822
|
||||
if (![key hasPrefix: @"1"])
|
||||
// Don't use body parts from nested bodies if not of type multipart/alternative. - e.g. body of type message/rfc822
|
||||
// Use only parts of level 0 or 1.
|
||||
if ([key countOccurrencesOfString: @"."] > 1)
|
||||
continue;
|
||||
else if ([key countOccurrencesOfString: @"."] == 1)
|
||||
{
|
||||
// Ignore nested parts if the container is not of type multipart/alternative.
|
||||
part = [self lookupInfoForBodyPart: [[key componentsSeparatedByString: @"."] objectAtIndex:0]];
|
||||
if (!([[part valueForKey: @"type"] isEqualToString: @"multipart"] && [[part valueForKey: @"subtype"] isEqualToString: @"alternative"]))
|
||||
continue;
|
||||
}
|
||||
|
||||
part = [self lookupInfoForBodyPart: key];
|
||||
type = [part valueForKey: @"type"];
|
||||
|
||||
Reference in New Issue
Block a user