diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2022-11-03 15:03:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-03 15:03:42 +0100 |
commit | 3b084e5fbcab6fea00685a81922635ec1428e8aa (patch) | |
tree | 5070a5151b9d54713178a5c2761eab5b38d44dda /apps | |
parent | 8a2e52e7f8124d0924da5ad7485c4426a9858f7b (diff) | |
parent | aebcc3126adf91e5666b76abc8e4b72a061e3243 (diff) | |
download | nextcloud-server-3b084e5fbcab6fea00685a81922635ec1428e8aa.tar.gz nextcloud-server-3b084e5fbcab6fea00685a81922635ec1428e8aa.zip |
Merge pull request #34893 from nextcloud/fix/move-imip-to-separate-interface
Move iMIP to its own interface
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/CalDAV/CalendarImpl.php | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/apps/dav/lib/CalDAV/CalendarImpl.php b/apps/dav/lib/CalDAV/CalendarImpl.php index 53cde5a7b75..79a5626f322 100644 --- a/apps/dav/lib/CalDAV/CalendarImpl.php +++ b/apps/dav/lib/CalDAV/CalendarImpl.php @@ -8,6 +8,7 @@ declare(strict_types=1); * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Georg Ehrke <oc.list@georgehrke.com> * @author Roeland Jago Douma <roeland@famdouma.nl> + * @author Anna Larch <anna.larch@gmx.net> * * @license GNU AGPL version 3 or any later version * @@ -29,22 +30,18 @@ namespace OCA\DAV\CalDAV; use OCA\DAV\CalDAV\Auth\CustomPrincipalPlugin; use OCA\DAV\CalDAV\InvitationResponse\InvitationResponseServer; -use OCP\AppFramework\Utility\ITimeFactory; use OCP\Calendar\Exceptions\CalendarException; use OCP\Calendar\ICreateFromString; +use OCP\Calendar\IHandleImipMessage; use OCP\Constants; -use OCP\Security\ISecureRandom; -use Psr\Log\LoggerInterface; use Sabre\DAV\Exception\Conflict; use Sabre\VObject\Component\VCalendar; use Sabre\VObject\Component\VEvent; -use Sabre\VObject\Document; use Sabre\VObject\ITip\Message; -use Sabre\VObject\Property\VCard\DateTime; use Sabre\VObject\Reader; use function Sabre\Uri\split as uriSplit; -class CalendarImpl implements ICreateFromString { +class CalendarImpl implements ICreateFromString, IHandleImipMessage { private CalDavBackend $backend; private Calendar $calendar; @@ -214,20 +211,20 @@ class CalendarImpl implements ICreateFromString { if(!isset($vEvent->{'ORGANIZER'}) || !isset($vEvent->{'ATTENDEE'})) { throw new CalendarException('Could not process scheduling data, neccessary data missing from ICAL'); } - $orgaizer = $vEvent->{'ORGANIZER'}->getValue(); + $organizer = $vEvent->{'ORGANIZER'}->getValue(); $attendee = $vEvent->{'ATTENDEE'}->getValue(); $iTipMessage->method = $vObject->{'METHOD'}->getValue(); if($iTipMessage->method === 'REPLY') { if ($server->isExternalAttendee($vEvent->{'ATTENDEE'}->getValue())) { - $iTipMessage->recipient = $orgaizer; + $iTipMessage->recipient = $organizer; } else { $iTipMessage->recipient = $attendee; } $iTipMessage->sender = $attendee; } else if($iTipMessage->method === 'CANCEL') { $iTipMessage->recipient = $attendee; - $iTipMessage->sender = $orgaizer; + $iTipMessage->sender = $organizer; } $iTipMessage->uid = isset($vEvent->{'UID'}) ? $vEvent->{'UID'}->getValue() : ''; $iTipMessage->component = 'VEVENT'; |