From b855104329d3a5b0b6eb69ee06a322a175be6832 Mon Sep 17 00:00:00 2001 From: Matt Stein Date: Sun, 3 Nov 2024 17:46:58 -0800 Subject: [PATCH 1/2] Return `is_active` and `is_dead` values for search results. --- app/Models/Contact/Contact.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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', From a202746ab5f6b4a6d252e42a25593035f1c46f36 Mon Sep 17 00:00:00 2001 From: Matt Stein Date: Sun, 3 Nov 2024 17:54:36 -0800 Subject: [PATCH 2/2] =?UTF-8?q?Don=E2=80=99t=20return=20archived=20contact?= =?UTF-8?q?s=20in=20search=20results.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Helpers/SearchHelper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } }