mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-18 03:38:49 +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:
@@ -197,8 +197,20 @@
|
||||
}
|
||||
|
||||
function contactFilter($query) {
|
||||
AddressBook.$filterAll($query);
|
||||
return AddressBook.$cards;
|
||||
return AddressBook.$filterAll($query).then(function(cards) {
|
||||
// Divide the matching cards by email addresses so the user can select
|
||||
// the recipient address of her choice
|
||||
var explodedCards = [];
|
||||
_.forEach(_.invokeMap(cards, 'explode'), function(manyCards) {
|
||||
_.forEach(manyCards, function(card) {
|
||||
explodedCards.push(card);
|
||||
});
|
||||
});
|
||||
// Remove duplicates
|
||||
return _.uniqBy(explodedCards, function(card) {
|
||||
return card.$$fullname + ' ' + card.$$email;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function addRecipient(contact, field) {
|
||||
|
||||
Reference in New Issue
Block a user