diff --git a/app/Helpers/SearchHelper.php b/app/Helpers/SearchHelper.php index 87dc394f650..084496dd1c3 100644 --- a/app/Helpers/SearchHelper.php +++ b/app/Helpers/SearchHelper.php @@ -48,6 +48,7 @@ public static function searchContacts(string $needle, string $orderByColumn, str } return Contact::search($needle, $accountId, $orderByColumn, $orderByDirection) - ->addressBook($accountId, $addressBookName); + ->addressBook($accountId, $addressBookName) + ->where('is_active', true); } } diff --git a/app/Models/Contact/Contact.php b/app/Models/Contact/Contact.php index 0b27265001a..ef660129178 100644 --- a/app/Models/Contact/Contact.php +++ b/app/Models/Contact/Contact.php @@ -88,8 +88,10 @@ class Contact extends Model 'account_id', 'created_at', 'updated_at', - 'is_partial', 'is_starred', + 'is_partial', + 'is_active', + 'is_dead', 'avatar_source', 'avatar_adorable_uuid', 'avatar_gravatar_url',