29 private $handleStatus =
false;
37 $handler =
new self();
38 $handler->component = $component;
67 if (!is_null($localEvent))
73 && !is_null($attendeeStatus = $this->getAttendeeStatus($user[
'EMAIL']))
77 $this->handleStatus =
true;
88 private function getAttendeeStatus(
string $userEmail): ?string
90 $attendees = $this->component->getEvent()->getAttendees();
91 if (is_iterable($attendees))
93 foreach ($attendees as $attendee)
95 if ($attendee->getParameterValueByName(
'email') === $userEmail
96 || $this->getMailTo($attendee->getValue()) === $userEmail)
98 $attendeeStatus = $attendee->getParameterValueByName(
'partstat');
99 if(array_key_exists($attendeeStatus,Dictionary::ATTENDEES_STATUS))
101 return Dictionary::ATTENDEES_STATUS[$attendeeStatus];
116 CCalendarEvent::SetMeetingStatusEx([
117 'attendeeId' => $event[
'OWNER_ID'],
118 'eventId' => $event[
'ID'],
119 'status' => $attendeeStatus,
120 'personalNotification' => $event[
'MEETING_HOST'],
129 return $this->handleStatus;
142 $attachments = $event->getParameter(
'attachments');
143 if (is_array($attachments))
145 foreach($attachments as $file)
147 if (in_array($file[
'type'], self::CONTENT_TYPES,
true))
151 $fileObject =
new File($file[
'tmp_name'], $event->getParameter(
'site_id'));
156 AddMessage2Log(
'File ics not found',
'calendar', 2);
164 if ($icalComponent->getMethod() === Dictionary::METHOD[
'reply'])