(fix) fallback to email if no cn is found (should avoid displaying bogus chips)

pull/217/head
Ludovic Marcotte 2016-06-21 15:57:35 -04:00
parent b72b52f052
commit 1efeca72c5
2 changed files with 3 additions and 3 deletions

View File

@ -118,7 +118,7 @@ NSNumber *iCalDistantFutureNumber = nil;
{
organizerData = [NSMutableDictionary dictionaryWithObjectsAndKeys:
[organizer rfc822Email], @"email",
[organizer cnWithoutQuotes], @"name",
([[organizer cnWithoutQuotes] length] ? [organizer cnWithoutQuotes] : [organizer rfc822Email]), @"name",
nil];
uid = [organizer uid];
if ([uid length]) [organizerData setObject: uid forKey: @"uid"];
@ -134,7 +134,7 @@ NSNumber *iCalDistantFutureNumber = nil;
{
attendeeData = [NSMutableDictionary dictionaryWithObjectsAndKeys:
[currentAttendee rfc822Email], @"email",
[currentAttendee cnWithoutQuotes], @"name",
([[currentAttendee cnWithoutQuotes] length] ? [currentAttendee cnWithoutQuotes] : [currentAttendee rfc822Email]) , @"name",
nil];
if ((uid = [currentAttendee uid]))
{

View File

@ -546,7 +546,7 @@
person = [participants objectAtIndex: i];
if (![[person delegatedTo] length])
[a addObject: [NSDictionary dictionaryWithObjectsAndKeys: ([person cnWithoutQuotes] ? [person cnWithoutQuotes] : [person rfc822Email]), @"name",
[a addObject: [NSDictionary dictionaryWithObjectsAndKeys: ([[person cnWithoutQuotes] length] ? [person cnWithoutQuotes] : [person rfc822Email]), @"name",
[person rfc822Email], @"email",
[[person partStatWithDefault] lowercaseString], @"partstat", nil]];
}