Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions apps/files_sharing/lib/Controller/ShareesAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Generator;
use OC\Collaboration\Collaborators\SearchResult;
use OC\Share\Share;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCA\Files_Sharing\ResponseDefinitions;
use OCP\App\IAppManager;
use OCP\AppFramework\Http;
Expand Down Expand Up @@ -72,6 +73,7 @@ public function __construct(
protected IURLGenerator $urlGenerator,
protected IManager $shareManager,
protected ISearch $collaboratorSearch,
protected FederatedShareProvider $federatedShareProvider,
) {
parent::__construct($appName, $request);
}
Expand Down Expand Up @@ -141,6 +143,20 @@ public function search(string $search = '', ?string $itemType = null, int $page
if ($this->shareManager->shareProviderExists(IShare::TYPE_ROOM)) {
$shareTypes[] = IShare::TYPE_ROOM;
}
} elseif ($itemType === 'contacts') {
if ($this->shareManager->allowGroupSharing()) {
$shareTypes[] = IShare::TYPE_GROUP;
}

if ($this->federatedShareProvider->isOutgoingServer2serverShareEnabled()) {
$shareTypes[] = IShare::TYPE_REMOTE;
}

if ($this->federatedShareProvider->isOutgoingServer2serverGroupShareEnabled()) {
$shareTypes[] = IShare::TYPE_REMOTE_GROUP;
}

$shareTypes[] = IShare::TYPE_EMAIL;
} else {
if ($this->shareManager->allowGroupSharing()) {
$shareTypes[] = IShare::TYPE_GROUP;
Expand Down
Loading