-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49253 from nextcloud/backport/49139/stable28
[stable28] feat: Add X-NC-Disable-Scheduling property to allow skipping scheduling
- Loading branch information
Showing
2 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -783,4 +783,23 @@ public function testNoButtons(): void { | |
$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:[email protected]'); | ||
$event->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); | ||
$event->add('X-NC-DISABLE-SCHEDULING', 'true'); | ||
$message = new Message(); | ||
$message->method = 'REQUEST'; | ||
$message->message = $calendar; | ||
$message->sender = 'mailto:[email protected]'; | ||
$message->senderName = 'Mr. Wizard'; | ||
$message->recipient = 'mailto:' . '[email protected]'; | ||
|
||
$this->plugin->schedule($message); | ||
$this->assertEquals('1.0;We got the message, but iMip messages are disabled for this event', $message->scheduleStatus); | ||
} | ||
} |