mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 19:35:38 +00:00
Monotone-Parent: 54cc41b15e02fc61bfa80e7db07aeb97e541fdfc
Monotone-Revision: 3c8a49fe7ef93ec55aaeef9dd064be1de6052cfe Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-21T15:50:07
This commit is contained in:
@@ -816,11 +816,12 @@
|
||||
{
|
||||
NSMutableDictionary *compactContacts, *returnContact;
|
||||
NSDictionary *userEntry;
|
||||
NSArray *newContacts;
|
||||
NSArray *newContacts, *allEmails;
|
||||
NSMutableArray *emails;
|
||||
NSString *uid, *email, *info;
|
||||
NSNumber *isGroup;
|
||||
id <SOGoSource> source;
|
||||
NSUInteger count, max;
|
||||
|
||||
compactContacts = [NSMutableDictionary dictionary];
|
||||
while ((userEntry = [contacts nextObject]))
|
||||
@@ -851,7 +852,17 @@
|
||||
[returnContact setObject: emails forKey: @"emails"];
|
||||
}
|
||||
email = [userEntry objectForKey: @"mail"];
|
||||
if (email && ![emails containsObject: email])
|
||||
if ([email isKindOfClass: [NSArray class]])
|
||||
{
|
||||
allEmails = (NSArray *) email;
|
||||
max = [allEmails count];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
email = [allEmails objectAtIndex: count];
|
||||
[emails addObjectUniquely: email];
|
||||
}
|
||||
}
|
||||
else if (email && ![emails containsObject: email])
|
||||
[emails addObject: email];
|
||||
email = [userEntry objectForKey: @"mozillasecondemail"];
|
||||
if (email && ![emails containsObject: email])
|
||||
|
||||
Reference in New Issue
Block a user