Skip to content

[Bug]: Events created through ICalendarEventBuilder do not trigger invitation emails #54062

@st3iny

Description

@st3iny

⚠️ This issue respects the following points: ⚠️

Bug description

The embedded DAV server instantiated by the builder (through ICreateFromString) is not loading our IMipPlugin. Hence, no invitations will be sent.

Internally, a InvitationResponseServer is instantiated which does not include all plugins which a real CalDAV server would. I consider this to be a bug.

Ref

$this->server->addPlugin(new \OCA\DAV\CalDAV\Plugin());
$this->server->addPlugin(new \Sabre\CalDAV\ICSExportPlugin());
$this->server->addPlugin(new \OCA\DAV\CalDAV\Schedule\Plugin(Server::get(IConfig::class), Server::get(LoggerInterface::class), Server::get(DefaultCalendarValidator::class)));
$this->server->addPlugin(new \Sabre\CalDAV\Subscriptions\Plugin());
$this->server->addPlugin(new \Sabre\CalDAV\Notifications\Plugin());

Proposed remediation:

  1. Fix the interface to include more appropriate CalDAV plugins in the server.
  2. Add a new method to ICreateFromString: createFromStringMinimal. This method keeps the old behavior as there are apps which actually rely on the "broken" logic, for example, Nextcloud Calendar (appointments).

Steps to reproduce

  1. Build an event using the event builder with at least one invitee.
  2. Create it in a calendar (ICreateFromString).

No invitation emails are dispatched.

Expected behavior

An invitation should be dispatched to each attendee.

Nextcloud Server version

31, main

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

📄 To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions