From 364e2fdcdfdd820a79f8608511677e4331c33859 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 10 Mar 2015 13:27:17 -0400 Subject: [PATCH] Return a single phone number in JSON contacts list --- SoObjects/Contacts/SOGoContactSourceFolder.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SoObjects/Contacts/SOGoContactSourceFolder.m b/SoObjects/Contacts/SOGoContactSourceFolder.m index 19e726a96..e385d9c09 100644 --- a/SoObjects/Contacts/SOGoContactSourceFolder.m +++ b/SoObjects/Contacts/SOGoContactSourceFolder.m @@ -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