Make calendar owner the event organizer
The ICS organizer was taken from the external link's organizer parameter. The CalDAV backend only schedules invitations when the organizer matches the calendar owner, so invites never went out under that value. The event now names the authenticated user's email address; the link organizer remains the fallback for users without a profile email and stays visible on the confirm page as meeting information.
This commit is contained in:
1 parent
9ae3f0a344
commit
97cea7e90b
2 files changed
+121
-2
No files matched your search
@@ -198,6 +198,12 @@ class CalendarController extends Controller
|
||||
throw new \RuntimeException('No authenticated Nextcloud user.');
|
||||
}
|
||||
|
||||
/*
|
||||
* The calendar owner must be the ICS organizer so the
|
||||
* CalDAV backend schedules the invitations in their name.
|
||||
*/
|
||||
$data['organizerEmail'] = $user->getEMailAddress() ?? '';
|
||||
|
||||
$calendars = $this->findWritableCalendars($user->getUID());
|
||||
|
||||
/*
|
||||
@@ -582,8 +588,16 @@ class CalendarController extends Controller
|
||||
$builder->setLocation($data['location']);
|
||||
}
|
||||
|
||||
if ($data['organizer'] !== '') {
|
||||
$builder->setOrganizer($data['organizer']);
|
||||
/*
|
||||
* Invitations come from the calendar owner, the
|
||||
* organizer of the external link is the fallback.
|
||||
*/
|
||||
$organizer = $data['organizerEmail'] !== ''
|
||||
? $data['organizerEmail']
|
||||
: $data['organizer'];
|
||||
|
||||
if ($organizer !== '') {
|
||||
$builder->setOrganizer($organizer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user