summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV
diff options
context:
space:
mode:
authorAnna Larch <anna@nextcloud.com>2022-10-31 11:16:45 +0100
committerAnna Larch <anna@nextcloud.com>2022-11-03 10:07:09 +0100
commitaebcc3126adf91e5666b76abc8e4b72a061e3243 (patch)
tree04537bddbdc7b53aeeb435977284527a83b7ad18 /apps/dav/lib/CalDAV
parentbfb764b5f3a26add7059391134c86a1fca460dfd (diff)
downloadnextcloud-server-aebcc3126adf91e5666b76abc8e4b72a061e3243.tar.gz
nextcloud-server-aebcc3126adf91e5666b76abc8e4b72a061e3243.zip
Move iMIP to it's own interface
and clean up the code a bit. Added: - author Removed: - unused imports Changed: - moved iMIP handling to new interface - pointed code to new implementation Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'apps/dav/lib/CalDAV')
-rw-r--r--apps/dav/lib/CalDAV/CalendarImpl.php15
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';