From af03f5d516f43a6b34c66b57f4a00659caf8ccb3 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 2 Jul 2021 09:47:42 +0200 Subject: [PATCH] Also hide group from direct matches Signed-off-by: Joas Schilling --- lib/private/Collaboration/Collaborators/GroupPlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Collaboration/Collaborators/GroupPlugin.php b/lib/private/Collaboration/Collaborators/GroupPlugin.php index dbe3b7293d9..75e52c19e0b 100644 --- a/lib/private/Collaboration/Collaborators/GroupPlugin.php +++ b/lib/private/Collaboration/Collaborators/GroupPlugin.php @@ -128,7 +128,7 @@ class GroupPlugin implements ISearchPlugin { // On page one we try if the search result has a direct hit on the // user id and if so, we add that to the exact match list $group = $this->groupManager->get($search); - if ($group instanceof IGroup && (!$this->shareWithGroupOnly || in_array($group->getGID(), $userGroups))) { + if ($group instanceof IGroup && !$group->hideFromCollaboration() && (!$this->shareWithGroupOnly || in_array($group->getGID(), $userGroups))) { $result['exact'][] = [ 'label' => $group->getDisplayName(), 'value' => [