From 9b1565a1d67e3045d276e1db8cfcd7953a290241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Lehrke?= Date: Mon, 28 Jun 2010 05:08:50 +0000 Subject: [PATCH] Improve group invitation handling --- calendar/inc/class.calendar_ical.inc.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/calendar/inc/class.calendar_ical.inc.php b/calendar/inc/class.calendar_ical.inc.php index 4f5fbad689..154b22ec52 100644 --- a/calendar/inc/class.calendar_ical.inc.php +++ b/calendar/inc/class.calendar_ical.inc.php @@ -496,6 +496,22 @@ class calendar_ical extends calendar_boupdate $participantURL = 'invalid:nomail'; $cutype = 'INDIVIDUAL'; } + $members = $GLOBALS['egw']->accounts->members($uid, true); + if (!isset($event['participants'][$this->user]) && in_array($this->user, $members)) + { + $user = $this->resource_info($this->user); + $attributes['ATTENDEE'][] = 'MAILTO:' . $user['email']; + $parameters['ATTENDEE'][] = array( + 'CN' => $user['name'], + 'ROLE' => 'REQ-PARTICIPANT', + 'PARTSTAT' => 'NEEDS-ACTION', + 'CUTYPE' => 'INDIVIDUAL', + 'RSVP' => 'TRUE', + 'X-EGROUPWARE-UID' => $this->user, + 'EMAIL' => $user['email'], + ); + $event['participants'][$this->user] = true; + } break; case 'r': $cutype = 'RESOURCE';