Partial contacts now load associated real contacts when searching (#1307)
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
UNRELEASED CHANGES:
|
||||
|
||||
* Remove automatic birthday reminder creation when editing a contact
|
||||
* Use external list of countries, with translations and reliability
|
||||
* Fixes Contact search dropdown shows non-contacts that link to nowhere
|
||||
* Add ability to sort contact list by untagged contacts
|
||||
* Allow multiple imported fields and replace existing contacts
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ class Contact extends Model
|
||||
'account_id',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'is_partial',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -458,7 +458,13 @@ class ContactsController extends Controller
|
||||
|
||||
if (count($results) !== 0) {
|
||||
foreach ($results as $key => $result) {
|
||||
$results[$key]->hash = $result->hashID();
|
||||
if ($result->is_partial) {
|
||||
$real = $result->getRelatedRealContact();
|
||||
|
||||
$results[$key]->hash = $real->hashID();
|
||||
} else {
|
||||
$results[$key]->hash = $result->hashID();
|
||||
}
|
||||
}
|
||||
|
||||
return $results;
|
||||
|
||||
Reference in New Issue
Block a user