Skip to content

Commit 4288f6b

Browse files
committed
feat(OCM-Invites): Enable the invitesAcceptedDialog
If the contacts app has enabled OCM invites, we need to show that in the discovery. Signed-off-by: Micke Nordin <[email protected]>
1 parent 0c6e396 commit 4288f6b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/private/OCM/OCMDiscoveryService.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ public function getLocalOCMProvider(bool $fullDetails = true): ICapabilityAwareO
151151
$provider->setApiVersion(self::API_VERSION);
152152
$provider->setEndPoint(substr($url, 0, $pos));
153153
$provider->setCapabilities(['/invite-accepted', '/notifications', '/shares']);
154+
// The inviteAcceptDialog is available from the contacts app, if this config value is set
155+
$ocmInvitesEnabled = $this->appConfig->getValueBool('contacts', 'ocm_invites_enabled');
156+
if ($ocmInvitesEnabled) {
157+
$inviteAcceptDialog = $this->urlGenerator->getAbsoluteURL('/apps/contacts/ocm/invite-accept-dialog');
158+
$provider->setInviteAcceptDialog($inviteAcceptDialog);
159+
}
154160

155161
$resource = $provider->createNewResourceType();
156162
$resource->setName('file')

0 commit comments

Comments
 (0)