mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-14 03:11:24 +00:00
Return a single phone number in JSON contacts list
This commit is contained in:
committed by
Ludovic Marcotte
parent
42c382d2f7
commit
364e2fdcdf
@@ -267,6 +267,13 @@
|
||||
data = [oldRecord objectForKey: @"homephone"];
|
||||
if (![data length])
|
||||
data = @"";
|
||||
else if ([data isKindOfClass: [NSArray class]])
|
||||
{
|
||||
if ([data count] > 0)
|
||||
data = [data objectAtIndex: 0];
|
||||
else
|
||||
data = @"";
|
||||
}
|
||||
[newRecord setObject: data forKey: @"c_telephonenumber"];
|
||||
|
||||
// Custom attribute for group-lookups. See LDAPSource.m where
|
||||
|
||||
Reference in New Issue
Block a user