Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable27] fix(caldav): add webroot to objectid for activities #40402

Merged
merged 1 commit into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
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
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
2 changes: 2 additions & 0 deletions apps/dav/tests/unit/CalDAV/Activity/Provider/EventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ public function testGenerateObjectParameter(int $id, string $name, ?array $link,
->with('calendar')
->willReturn($calendarAppEnabled);
if ($calendarAppEnabled) {
$this->url->expects($this->once())
->method('getWebroot');
$this->url->expects($this->once())
->method('linkToRouteAbsolute')
->with('calendar.view.indexview.timerange.edit', $generatedLink)
Expand Down
Loading