aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorkesselb <mail@danielkesselberg.de>2021-09-07 16:03:08 +0200
committerGitHub <noreply@github.com>2021-09-07 16:03:08 +0200
commitfa8083ac1247f60a07a05a3dc6ca187474c364b8 (patch)
treeaf4b063944d08c302ea2bc62061a93fa4bca3193 /apps/dav
parent74a149720d2fd57f7a68e233575779e10a953311 (diff)
parent56cc01c45c5d34938c9affa190df9e479690bad1 (diff)
downloadnextcloud-server-fa8083ac1247f60a07a05a3dc6ca187474c364b8.tar.gz
nextcloud-server-fa8083ac1247f60a07a05a3dc6ca187474c364b8.zip
Merge pull request #28692 from nextcloud/enh/send-invitation-to-req-participants
Send attendence links to required and optinal attendees of an event without an RSVP
Diffstat (limited to 'apps/dav')
-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 fa87db45797..b7baef89ab9 100644
--- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
@@ -255,9 +255,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
@@ -395,12 +394,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;