Skip to content

Commit

Permalink
fix(caldav): add webroot to objectid for activities
Browse files Browse the repository at this point in the history
A calendar uri includes the webroot: example.com/cloud/remote.php/dav/calendars/alice/personal/
The calendar app uses base64(calendar uri) as identifier for calendar objects.

Without this patch the links from activity app to calendar app don't work for installations in a subdirectory.

Signed-off-by: Daniel Kesselberg <[email protected]>
  • Loading branch information
kesselb committed Sep 6, 2023
1 parent 165aeeb commit a6a68c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/dav/lib/CalDAV/Activity/Provider/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ protected function generateObjectParameter(array $eventData) {
// The calendar app needs to be manually loaded for the routes to be loaded
OC_App::loadApp('calendar');
$linkData = $eventData['link'];
$objectId = base64_encode('/remote.php/dav/calendars/' . $linkData['owner'] . '/' . $linkData['calendar_uri'] . '/' . $linkData['object_uri']);
$objectId = base64_encode($this->url->getWebroot() . '/remote.php/dav/calendars/' . $linkData['owner'] . '/' . $linkData['calendar_uri'] . '/' . $linkData['object_uri']);
$link = [
'view' => 'dayGridMonth',
'timeRange' => 'now',
Expand Down

0 comments on commit a6a68c8

Please sign in to comment.