diff --git a/ActiveSync/SOGoMailObject+ActiveSync.m b/ActiveSync/SOGoMailObject+ActiveSync.m index c1df14dca..0eb08b2ec 100644 --- a/ActiveSync/SOGoMailObject+ActiveSync.m +++ b/ActiveSync/SOGoMailObject+ActiveSync.m @@ -538,6 +538,10 @@ struct GlobalObjectId { NSData *d, *globalObjId; NSArray *attachmentKeys; NSMutableString *s; + + uint32_t v; + NSString *p; + id value; iCalCalendar *calendar; @@ -578,8 +582,25 @@ struct GlobalObjectId { if (value) [s appendFormat: @"%@", [value activeSyncRepresentationInContext: context]]; - // Importance - FIXME - [s appendFormat: @"%@", @"1"]; + // Importance + v = 0x1; + p = [[self mailHeaders] objectForKey: @"x-priority"]; + + if (p) + { + if ([p hasPrefix: @"1"]) v = 0x2; + else if ([p hasPrefix: @"2"]) v = 0x2; + else if ([p hasPrefix: @"4"]) v = 0x0; + else if ([p hasPrefix: @"5"]) v = 0x0; + } + else + { + p = [[self mailHeaders] objectForKey: @"importance"]; + if ([p hasPrefix: @"High"]) v = 0x2; + else if ([p hasPrefix: @"Low"]) v = 0x0; + } + + [s appendFormat: @"%d", v]; // Read [s appendFormat: @"%d", ([self read] ? 1 : 0)]; diff --git a/NEWS b/NEWS index 9826552c3..ee919af3e 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ 2.2.17 (2015-02-xx) ------------------- +Enhancements + - support for mail prority using EAS + Bug fixes - fixed login issue after password change (#2601) - fixed potential encoding issue using EAS and 8-bit mails (#3116)