From ec8a47e6af91bf259c0c3ecde7ca6e71380e82db Mon Sep 17 00:00:00 2001 From: Anna Larch Date: Thu, 22 Aug 2024 17:09:08 +0200 Subject: [PATCH] feat: allow inviting contact groups Signed-off-by: Anna Larch --- lib/Controller/ContactController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Controller/ContactController.php b/lib/Controller/ContactController.php index af1ee7518..d32e64443 100644 --- a/lib/Controller/ContactController.php +++ b/lib/Controller/ContactController.php @@ -115,7 +115,7 @@ public function searchAttendee(string $search):JSONResponse { return new JSONResponse(); } - $result = $this->contactsManager->search($search, ['FN', 'EMAIL']); + $result = $this->contactsManager->search($search, ['FN', 'EMAIL', 'CATEGORIES']); $contacts = []; foreach ($result as $r) { @@ -133,6 +133,10 @@ public function searchAttendee(string $search):JSONResponse { $r['EMAIL'] = [$r['EMAIL']]; } + if(isset($r['CATEGORIES'])) { + $categories = explode(',', $r['CATEGORIES']); + } + $photo = isset($r['PHOTO']) ? $this->getPhotoUri($r['PHOTO']) : null; @@ -161,6 +165,7 @@ public function searchAttendee(string $search):JSONResponse { 'lang' => $lang, 'tzid' => $timezoneId, 'photo' => $photo, + 'categories' => $categories ?? [], ]; }