Skip to content

Commit 2d2e4a1

Browse files
committed
Add function to get OCM provider from LocalOCMDiscoveryEvent.
Signed-off-by: antoonp <antoon@redblom.com>
1 parent 3f2f766 commit 2d2e4a1

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

lib/private/OCM/OCMDiscoveryService.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,6 @@ public function getLocalOCMProvider(bool $fullDetails = true): IOCMProvider {
202202
$provider->setEndPoint(substr($url, 0, $pos));
203203
$provider->setCapabilities(['notifications', 'shares']);
204204

205-
// The inviteAcceptDialog is available from the contacts app, if this config value is set
206-
$inviteAcceptDialog = $this->appConfig->getValueString('core', ConfigLexicon::OCM_INVITE_ACCEPT_DIALOG);
207-
if ($inviteAcceptDialog !== '') {
208-
$provider->setInviteAcceptDialog($this->urlGenerator->linkToRouteAbsolute($inviteAcceptDialog));
209-
}
210-
211205
$resource = $provider->createNewResourceType();
212206
$resource->setName('file')
213207
->setShareTypes(['user', 'group'])

lib/public/OCM/Events/LocalOCMDiscoveryEvent.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,15 @@ public function registerResourceType(string $name, array $shareTypes, array $pro
5454
->setProtocols($protocols);
5555
$this->provider->addResourceType($resourceType);
5656
}
57+
58+
/**
59+
* Returns the ocm provider.
60+
*
61+
* @return IOCMProvider
62+
*
63+
* @since 33.0.0
64+
*/
65+
public function getProvider(): IOCMProvider {
66+
return $this->provider;
67+
}
5768
}

0 commit comments

Comments
 (0)