Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorAnna Larch <anna@nextcloud.com>2021-09-02 00:05:41 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-09-07 17:11:08 +0300
commit2f3dc4ea11f2f04ee3f2e5646d2a54f77e7dc78a (patch)
tree1f5442a65c0d6424817ba4a5cdd1cce40e4563b3 /apps
parenta92d1d13eb823c9849b4791861041c2f5bc8b3ab (diff)
Send Invitation to Attendees with ROLE=REQ-PARTICIPANT
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/CalDAV/Schedule/IMipPlugin.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
index e977ebcf44a..79b26ae2be6 100644
--- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
@@ -250,9 +250,8 @@ class IMipPlugin extends SabreIMipPlugin {
$this->addSubjectAndHeading($template, $l10n, $method, $summary);
$this->addBulletList($template, $l10n, $vevent);
-
// Only add response buttons to invitation requests: Fix Issue #11230
- if (($method == self::METHOD_REQUEST) && $this->getAttendeeRSVP($attendee)) {
+ if (($method == self::METHOD_REQUEST) && $this->getAttendeeRsvpOrReqForParticipant($attendee)) {
/*
** Only offer invitation accept/reject buttons, which link back to the
@@ -390,12 +389,21 @@ class IMipPlugin extends SabreIMipPlugin {
* @param Property|null $attendee
* @return bool
*/
- private function getAttendeeRSVP(Property $attendee = null) {
+ private function getAttendeeRsvpOrReqForParticipant(Property $attendee = null) {
if ($attendee !== null) {
$rsvp = $attendee->offsetGet('RSVP');
if (($rsvp instanceof Parameter) && (strcasecmp($rsvp->getValue(), 'TRUE') === 0)) {
return true;
}
+ $role = $attendee->offsetGet('ROLE');
+ // @see https://datatracker.ietf.org/doc/html/rfc5545#section-3.2.16
+ // Attendees without a role are assumed required and should receive an invitation link even if they have no RSVP set
+ if ($role === null
+ || (($role instanceof Parameter) && (strcasecmp($role->getValue(), 'REQ-PARTICIPANT') === 0))
+ || (($role instanceof Parameter) && (strcasecmp($role->getValue(), 'OPT-PARTICIPANT') === 0))
+ ) {
+ return true;
+ }
}
// RFC 5545 3.2.17: default RSVP is false
return false;