mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-20 19:05:25 +00:00
(fix) handle multi-valued mozillasecondemail attribute mapping
This commit is contained in:
@@ -274,8 +274,24 @@ convention:
|
||||
}
|
||||
}
|
||||
|
||||
homeMail = [self elementWithTag: @"email" ofType: @"home"];
|
||||
[homeMail setSingleValue: [ldifRecord objectForKey: @"mozillasecondemail"] forKey: @""];
|
||||
mail = [ldifRecord objectForKey: @"mozillasecondemail"];
|
||||
if ([mail isKindOfClass: [NSArray class]])
|
||||
{
|
||||
mailList = [(NSArray *)mail objectEnumerator];
|
||||
while ((mail = [mailList nextObject]))
|
||||
{
|
||||
if ([mail length] && ![emails containsObject: mail])
|
||||
[self addElementWithTag: @"email"
|
||||
ofType: @"home"
|
||||
withValue: mail];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
homeMail = [self elementWithTag: @"email" ofType: @"home"];
|
||||
[homeMail setSingleValue: mail forKey: @""];
|
||||
}
|
||||
|
||||
[[self uniqueChildWithTag: @"x-mozilla-html"]
|
||||
setSingleValue: [ldifRecord objectForKey: @"mozillausehtmlmail"]
|
||||
forKey: @""];
|
||||
|
||||
Reference in New Issue
Block a user