diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2021-10-22 12:07:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-22 12:07:39 +0200 |
commit | 8b742ab39401ac4e4a40aa3aab01742ea09b8344 (patch) | |
tree | 73940c5ccff06cec84291867bef495fa2052d811 /apps/dav/lib | |
parent | 2be0eda47cb3891573f4e0c609a46a080095b017 (diff) | |
parent | fab887cb7c577a3e70219e686707bb52e0bc9bbe (diff) | |
download | nextcloud-server-8b742ab39401ac4e4a40aa3aab01742ea09b8344.tar.gz nextcloud-server-8b742ab39401ac4e4a40aa3aab01742ea09b8344.zip |
Merge pull request #28997 from nextcloud/fix/set-attendee-as-recipient
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php | 6 | ||||
-rw-r--r-- | apps/dav/lib/Controller/InvitationResponseController.php | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php b/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php index 90e2e478e1c..af3d7c1269a 100644 --- a/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php +++ b/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php @@ -124,4 +124,10 @@ class InvitationResponseServer { $schedulingPlugin = $this->server->getPlugin('caldav-schedule'); $schedulingPlugin->scheduleLocalDelivery($iTipMessage); } + + public function isExternalAttendee(string $principalUri): bool { + /** @var \Sabre\DAVACL\Plugin $aclPlugin */ + $aclPlugin = $this->server->getPlugin('acl'); + return $aclPlugin->getPrincipalByUri($principalUri) === null; + } } diff --git a/apps/dav/lib/Controller/InvitationResponseController.php b/apps/dav/lib/Controller/InvitationResponseController.php index f6923152dce..de22e3ba6a9 100644 --- a/apps/dav/lib/Controller/InvitationResponseController.php +++ b/apps/dav/lib/Controller/InvitationResponseController.php @@ -198,7 +198,12 @@ class InvitationResponseController extends Controller { $iTipMessage->method = 'REPLY'; $iTipMessage->sequence = $row['sequence']; $iTipMessage->sender = $row['attendee']; - $iTipMessage->recipient = $row['organizer']; + + if ($this->responseServer->isExternalAttendee($row['attendee'])) { + $iTipMessage->recipient = $row['organizer']; + } else { + $iTipMessage->recipient = $row['attendee']; + } $message = <<<EOF BEGIN:VCALENDAR |