|
|
|
|
@ -20,8 +20,6 @@ use OCP\Share\IShare; |
|
|
|
|
use Psr\Log\LoggerInterface; |
|
|
|
|
|
|
|
|
|
class LookupPlugin implements ISearchPlugin { |
|
|
|
|
/** @var string remote part of the current user's cloud id */ |
|
|
|
|
private string $currentUserRemote; |
|
|
|
|
|
|
|
|
|
public function __construct( |
|
|
|
|
private readonly IConfig $config, |
|
|
|
|
@ -33,7 +31,6 @@ class LookupPlugin implements ISearchPlugin { |
|
|
|
|
private readonly GlobalScaleConfig $globalScaleConfig, |
|
|
|
|
) { |
|
|
|
|
$currentUserCloudId = $userSession->getUser()->getCloudId(); |
|
|
|
|
$this->currentUserRemote = $cloudIdManager->resolveCloudId($currentUserCloudId)->getRemote(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#[\Override] |
|
|
|
|
@ -77,9 +74,6 @@ class LookupPlugin implements ISearchPlugin { |
|
|
|
|
]); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
if ($this->currentUserRemote === $remote) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
$name = $lookup['name']['value'] ?? ''; |
|
|
|
|
$label = empty($name) ? $lookup['federationId'] : $name . ' (' . $lookup['federationId'] . ')'; |
|
|
|
|
$result[] = [ |
|
|
|
|
|