aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit
diff options
context:
space:
mode:
authorSebastianKrupinski <krupinskis05@gmail.com>2024-11-07 15:13:13 -0500
committerSebastianKrupinski <krupinskis05@gmail.com>2024-11-11 12:40:55 -0500
commitbfa23ff6c7e28664e6e1a679fc3844978bfc43d2 (patch)
tree7fddc7ed5bc1379ec3e28cdd09203f370b936e97 /apps/dav/tests/unit
parent8fdae44816667f2818742138e186794b7fcdf86c (diff)
downloadnextcloud-server-bfa23ff6c7e28664e6e1a679fc3844978bfc43d2.tar.gz
nextcloud-server-bfa23ff6c7e28664e6e1a679fc3844978bfc43d2.zip
feat: Add X-NC-Disable-Scheduling property to allow skipping scheduling
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Diffstat (limited to 'apps/dav/tests/unit')
-rw-r--r--apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php
index 36ce091fc69..18208981038 100644
--- a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php
+++ b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php
@@ -890,4 +890,23 @@ class IMipPluginTest extends TestCase {
$this->plugin->schedule($message);
$this->assertEquals('1.1', $message->getScheduleStatus());
}
+
+ public function testImipDisabledForEvent(): void {
+ // construct iTip message with event and attendees
+ $calendar = new VCalendar();
+ $calendar->add('VEVENT', ['UID' => 'uid-1234']);
+ $event = $calendar->VEVENT;
+ $event->add('ORGANIZER', 'mailto:gandalf@wiz.ard');
+ $event->add('ATTENDEE', 'mailto:' . 'frodo@hobb.it', ['RSVP' => 'TRUE', 'CN' => 'Frodo']);
+ $event->add('X-NC-DISABLE-SCHEDULING', 'true');
+ $message = new Message();
+ $message->method = 'REQUEST';
+ $message->message = $calendar;
+ $message->sender = 'mailto:gandalf@wiz.ard';
+ $message->senderName = 'Mr. Wizard';
+ $message->recipient = 'mailto:' . 'frodo@hobb.it';
+
+ $this->plugin->schedule($message);
+ $this->assertEquals('1.0;We got the message, but iMip messages are disabled for this event', $message->scheduleStatus);
+ }
}