diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-12-11 08:38:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-11 08:38:20 +0100 |
commit | c1451b2ab162ee0ce9b5694367ff361d6d9b42eb (patch) | |
tree | 4a28b475e6715b6c06684f2b1a24ea7d1a8e0905 | |
parent | 274c98da9b23d11900524ecb2f2fd59e4e263c24 (diff) | |
parent | f186279bf472813cfcced1b7a9b65658f2b840cf (diff) | |
download | nextcloud-server-c1451b2ab162ee0ce9b5694367ff361d6d9b42eb.tar.gz nextcloud-server-c1451b2ab162ee0ce9b5694367ff361d6d9b42eb.zip |
Merge pull request #49779 from nextcloud/backport/49503/stable29
-rw-r--r-- | apps/dav/lib/CalDAV/Schedule/IMipPlugin.php | 8 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Schedule/Plugin.php | 1 | ||||
-rw-r--r-- | apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php | 19 | ||||
-rw-r--r-- | apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php | 1 |
4 files changed, 2 insertions, 27 deletions
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php index 4d771f0f7f8..6d70d6fac47 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php @@ -133,14 +133,6 @@ class IMipPlugin extends SabreIMipPlugin { */ public function schedule(Message $iTipMessage) { - // do not send imip messages if external system already did - /** @psalm-suppress UndefinedPropertyFetch */ - if ($iTipMessage->message?->VEVENT?->{'X-NC-DISABLE-SCHEDULING'}?->getValue() === 'true') { - if (!$iTipMessage->scheduleStatus) { - $iTipMessage->scheduleStatus = '1.0;We got the message, but iMip messages are disabled for this event'; - } - return; - } // Not sending any emails if the system considers the update insignificant if (!$iTipMessage->significantChange) { if (!$iTipMessage->scheduleStatus) { diff --git a/apps/dav/lib/CalDAV/Schedule/Plugin.php b/apps/dav/lib/CalDAV/Schedule/Plugin.php index 971f4b9cafd..1e67741256c 100644 --- a/apps/dav/lib/CalDAV/Schedule/Plugin.php +++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php @@ -1,4 +1,5 @@ <?php + /** * @copyright Copyright (c) 2016, Roeland Jago Douma <roeland@famdouma.nl> * @copyright Copyright (c) 2016, Joas Schilling <coding@schilljs.com> diff --git a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php index 7813a7942fe..de6218bf5f5 100644 --- a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php +++ b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php @@ -783,23 +783,4 @@ 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); - } } diff --git a/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php b/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php index f3a00b6ccf2..937a7c1a485 100644 --- a/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php +++ b/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php @@ -1,4 +1,5 @@ <?php + /** * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch> * |