Skip to content

Commit

Permalink
feat: allow inviting contact groups
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Larch <anna@nextcloud.com>
  • Loading branch information
miaulalala committed Aug 22, 2024
1 parent 4e99f60 commit ec8a47e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Controller/ContactController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down Expand Up @@ -161,6 +165,7 @@ public function searchAttendee(string $search):JSONResponse {
'lang' => $lang,
'tzid' => $timezoneId,
'photo' => $photo,
'categories' => $categories ?? [],
];
}

Expand Down

0 comments on commit ec8a47e

Please sign in to comment.