diff --git a/src/applications/calendar/storage/PhabricatorCalendarEvent.php b/src/applications/calendar/storage/PhabricatorCalendarEvent.php --- a/src/applications/calendar/storage/PhabricatorCalendarEvent.php +++ b/src/applications/calendar/storage/PhabricatorCalendarEvent.php @@ -491,11 +491,22 @@ $parent_invitees = $parent->getInvitees(); $stub_invitees = array(); + // All stubs should inherit the host's status foreach ($parent_invitees as $invitee) { + $host_phid = $parent->getHostPHID(); + $inviter_phid = $invitee->getInviterPHID(); + $invitee_phid = $invitee->getInviteePHID(); + + if ($host_phid === $invitee_phid) { + $status = $invitee->getStatus(); + } else { + $status = PhabricatorCalendarEventInvitee::STATUS_INVITED; + } + $stub_invitee = id(new PhabricatorCalendarEventInvitee()) - ->setInviteePHID($invitee->getInviteePHID()) - ->setInviterPHID($invitee->getInviterPHID()) - ->setStatus(PhabricatorCalendarEventInvitee::STATUS_INVITED); + ->setInviteePHID($inviter_phid) + ->setInviterPHID($invitee_phid) + ->setStatus($status); $stub_invitees[] = $stub_invitee; }