Skip to content

Commit b91dfee

Browse files
fix: obey x-nc-scheduling flag on delete
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
1 parent 0cd3755 commit b91dfee

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

apps/dav/lib/CalDAV/Schedule/Plugin.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ public function calendarObjectChange(RequestInterface $request, ResponseInterfac
165165

166166
// Do not generate iTip and iMip messages if scheduling is disabled for this message
167167
if ($request->getHeader('x-nc-scheduling') === 'false') {
168+
$this->logger->debug('Skipping scheduling messages for calendar object change because x-nc-scheduling header is set to false');
168169
return;
169170
}
170171

@@ -212,6 +213,13 @@ public function calendarObjectChange(RequestInterface $request, ResponseInterfac
212213
* @inheritDoc
213214
*/
214215
public function beforeUnbind($path): void {
216+
217+
// Do not generate iTip and iMip messages if scheduling is disabled for this message
218+
if ($this->server->httpRequest->getHeader('x-nc-scheduling') === 'false') {
219+
$this->logger->debug('Skipping scheduling messages for calendar object delete because x-nc-scheduling header is set to false');
220+
return;
221+
}
222+
215223
try {
216224
parent::beforeUnbind($path);
217225
} catch (SameOrganizerForAllComponentsException $e) {

0 commit comments

Comments
 (0)