mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 16:35:10 +00:00
Expose all email addresses in autocompletion
This change is immediately applicable to LDAP-based system address books. However, personal SQL-based address books must have their quick tables recreated. To do so, one must use sogo-tool to backup and restore the user's data. Resolves #3443, #3526
This commit is contained in:
@@ -264,9 +264,23 @@ static NSArray *folderListingFields = nil;
|
||||
data = [contactRecord objectForKey: @"c_mail"];
|
||||
if ([data length])
|
||||
{
|
||||
NSArray *values;
|
||||
NSDictionary *email;
|
||||
email = [NSDictionary dictionaryWithObjectsAndKeys: @"pref", @"type", data, @"value", nil];
|
||||
[contactRecord setObject: [NSArray arrayWithObject: email] forKey: @"emails"];
|
||||
NSMutableArray *emails;
|
||||
NSString *type, *value;
|
||||
int i, max;
|
||||
|
||||
values = [data componentsSeparatedByString: @","];
|
||||
max = [values count];
|
||||
emails = [NSMutableArray arrayWithCapacity: max];
|
||||
for (i = 0; i < max; i++)
|
||||
{
|
||||
type = (i == 0)? @"pref" : @"home";
|
||||
value = [values objectAtIndex: i];
|
||||
email = [NSDictionary dictionaryWithObjectsAndKeys: type, @"type", value, @"value", nil];
|
||||
[emails addObject: email];
|
||||
}
|
||||
[contactRecord setObject: emails forKey: @"emails"];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user