Skip to content

Commit

Permalink
Request: 14118 Send CANCEL iTip when attendee is removed from meeting.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Sep 27, 2015
1 parent 619c066 commit 3ef5673
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions kronolith/lib/Ajax/Application/Handler.php
Expand Up @@ -309,7 +309,9 @@ public function saveEvent()
}
} else {
try {
$old_attendees = $event->attendees;
$event->readForm();
$removed_attendees = array_diff(array_keys($old_attendees), array_keys($event->attendees));
$result = $this->_saveEvent($event);
} catch (Exception $e) {
$GLOBALS['notification']->push($e);
Expand All @@ -321,6 +323,13 @@ public function saveEvent()
$type = $event->status == Kronolith::STATUS_CANCELLED ? Kronolith::ITIP_CANCEL : Kronolith::ITIP_REQUEST;
Kronolith::sendITipNotifications($event, $GLOBALS['notification'], $type);
}
if (!empty($removed_attendees)) {
foreach ($removed_attendees as $email) {
$to_cancel[$email] = $old_attendees[$email];
}
$event->attendees = $to_cancel;
Kronolith::sendITipNotifications($event, $GLOBALS['notification'], Kronolith::ITIP_CANCEL);
}
Kronolith::notifyOfResourceRejection($event);

return $result;
Expand Down

0 comments on commit 3ef5673

Please sign in to comment.