aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorSebastianKrupinski <krupinskis05@gmail.com>2024-11-26 19:52:01 -0500
committerSebastianKrupinski <krupinskis05@gmail.com>2024-12-10 12:39:49 -0500
commit04cb122af2f78dd223e413326994aba5c3b57114 (patch)
tree883373cb8292c9adb0d6b143ee8dfbffb939bfe7 /apps/dav/lib
parent28ec9c7e80e825aea2537f865e2862aecf25c8f1 (diff)
downloadnextcloud-server-04cb122af2f78dd223e413326994aba5c3b57114.tar.gz
nextcloud-server-04cb122af2f78dd223e413326994aba5c3b57114.zip
fix: disable both iTip and iMip messagesfix/issue-48528-disable-itip-and-imip-messages-2
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/CalDAV/Schedule/IMipPlugin.php8
-rw-r--r--apps/dav/lib/CalDAV/Schedule/Plugin.php8
2 files changed, 7 insertions, 9 deletions
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
index d81d85573fc..0aecb18ce80 100644
--- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
@@ -97,14 +97,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 eebfe2ead49..eeeebe16b88 100644
--- a/apps/dav/lib/CalDAV/Schedule/Plugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -162,10 +163,15 @@ class Plugin extends \Sabre\CalDAV\Schedule\Plugin {
try {
+ // Do not generate iTip and iMip messages if scheduling is disabled for this message
+ if ($request->getHeader('x-nc-scheduling') === 'false') {
+ return;
+ }
+
if (!$this->scheduleReply($this->server->httpRequest)) {
return;
}
-
+
/** @var Calendar $calendarNode */
$calendarNode = $this->server->tree->getNodeForPath($calendarPath);
// extract addresses for owner