Compare commits

..
3 Commits
Author SHA1 Message Date
stefan.tollkuehn b4fc9db09a fix typo 2026-10-08 10:36:24 +02:00
stefan.tollkuehn 29edf89cb2 remove hardcoded nextcloud url 2026-10-08 10:35:31 +02:00
stefan.tollkuehn 5bdbc7477c add default alert (15min before event starts) 2026-10-08 10:14:32 +02:00
3 changed files with 27 additions and 2 deletions

No files matched your search

+5
View File
@@ -46,6 +46,11 @@ the event and submits the form. The event lands in the user's
Dates carry no timezone and are interpreted in the user's Nextcloud Dates carry no timezone and are interpreted in the user's Nextcloud
timezone (server default as fallback). timezone (server default as fallback).
## Reminder
Every created event gets a display alarm 15 minutes before it starts
(`TRIGGER:-PT15M` VALARM). The reminder is not configurable.
Example: Example:
``` ```
+21 -1
View File
@@ -16,6 +16,7 @@ use OCP\IRequest;
use OCP\IURLGenerator; use OCP\IURLGenerator;
use OCP\IUserSession; use OCP\IUserSession;
use OCP\IDateTimeZone; use OCP\IDateTimeZone;
use Sabre\VObject\Reader;
class CalendarController extends Controller class CalendarController extends Controller
{ {
@@ -24,6 +25,11 @@ class CalendarController extends Controller
*/ */
private const CALENDAR_NAME = 'Personal'; private const CALENDAR_NAME = 'Personal';
/*
* Default reminder: 15 minutes before the event starts.
*/
private const REMINDER_TRIGGER = '-PT15M';
/* /*
* datetime-local format as sent by jitsi-launch, * datetime-local format as sent by jitsi-launch,
* e.g. "2026-10-07T14:15". * e.g. "2026-10-07T14:15".
@@ -225,7 +231,21 @@ class CalendarController extends Controller
$builder->setOrganizer($data['organizer']); $builder->setOrganizer($data['organizer']);
} }
$builder->createInCalendar($calendar); /*
* ICalendarEventBuilder supports no alarms, so the VALARM
* is injected into the serialized ICS before writing it.
*/
$vobject = Reader::read($builder->toIcs());
$vobject->VEVENT->add('VALARM', [
'ACTION' => 'DISPLAY',
'DESCRIPTION' => 'Reminder',
'TRIGGER' => self::REMINDER_TRIGGER,
]);
$fileName = (string) $vobject->VEVENT->UID . '.ics';
$calendar->createFromString($fileName, $vobject->serialize());
} }
/** /**
+1 -1
View File
@@ -143,7 +143,7 @@ $h = static function (string $value): string {
</button> </button>
<a <a
href="https://cloud.bnvb-ingenieure.de/" href="<?php $urlGenerator->getAbsoluteURL('/') ?>"
class="secondary" class="secondary"
> >
Cancel Cancel