mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Always display LDAP contacts in priority. If a local contact matches, partially or totally, the LDAP contact, still display both.
This commit is contained in:
parent
eb0929899a
commit
f5bb899aa9
1 changed files with 5 additions and 5 deletions
|
|
@ -58,6 +58,11 @@ import linphonesw
|
|||
|
||||
func searchAndAddMatchingContact(searchResult: SearchResult) -> Contact? {
|
||||
if let friend = searchResult.friend {
|
||||
if (searchResult.sourceFlags == MagicSearchSource.LdapServers.rawValue), let newContact = Contact(friend: friend.getCobject) {
|
||||
// Contact comes from LDAP, creating a new one
|
||||
newContact.createdFromLdap = true
|
||||
return newContact
|
||||
}
|
||||
if let addr = friend.address, let foundContact = getContactFromAddr(addr: addr) {
|
||||
return foundContact
|
||||
}
|
||||
|
|
@ -66,11 +71,6 @@ import linphonesw
|
|||
return foundContact
|
||||
}
|
||||
}
|
||||
// No contacts found (searchResult likely comes from LDAP), creating a new one
|
||||
if let newContact = Contact(friend: friend.getCobject) {
|
||||
newContact.createdFromLdap = true
|
||||
return newContact
|
||||
}
|
||||
}
|
||||
|
||||
if let addr = searchResult.address, let foundContact = getContactFromAddr(addr: addr) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue