From d49ad7ea47e35a463e4953c9922a5af77ff7acf2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 8 Dec 2021 17:26:30 +0100 Subject: Limit more contact searches Signed-off-by: Joas Schilling --- apps/sharebymail/lib/Activity.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apps/sharebymail') diff --git a/apps/sharebymail/lib/Activity.php b/apps/sharebymail/lib/Activity.php index ff012654834..3992f0f942b 100644 --- a/apps/sharebymail/lib/Activity.php +++ b/apps/sharebymail/lib/Activity.php @@ -362,7 +362,12 @@ class Activity implements IProvider { * @return string */ protected function getContactName($email) { - $addressBookContacts = $this->contactsManager->search($email, ['EMAIL']); + $addressBookContacts = $this->contactsManager->search($email, ['EMAIL'], [ + 'limit' => 1, + 'enumeration' => false, + 'fullmatch' => false, + 'strict_search' => true, + ]); foreach ($addressBookContacts as $contact) { if (isset($contact['isLocalSystemBook'])) { -- cgit v1.2.3