Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/ITip/Broker.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@ protected function parseEventForOrganizer(VCalendar $calendar, array $eventInfo,
}

$messages = [];

foreach ($attendees as $attendee) {
// An organizer can also be an attendee. We should not generate any
// messages for those.
Expand Down Expand Up @@ -892,6 +891,9 @@ protected function parseEventInfo(VCalendar $calendar): array
$timezone = $vevent->{'RECURRENCE-ID'}->getDateTime()->getTimeZone();
}
}

$instances[$recurId] = $vevent;

if (isset($vevent->ATTENDEE)) {
foreach ($vevent->ATTENDEE as $attendee) {
if ($this->scheduleAgentServerRules
Expand Down Expand Up @@ -930,7 +932,6 @@ protected function parseEventInfo(VCalendar $calendar): array
];
}
}
$instances[$recurId] = $vevent;
}

foreach ($this->significantChangeProperties as $prop) {
Expand Down
6 changes: 2 additions & 4 deletions tests/VObject/Component/VAvailabilityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,7 @@ protected function template(array $properties)
END:VAVAILABILITY
END:VCALENDAR
VCAL
,
VCAL,
$properties
);
}
Expand All @@ -459,8 +458,7 @@ protected function templateAvailable(array $properties)
END:AVAILABLE
END:VAVAILABILITY
END:VCALENDAR
VCAL
,
VCAL,
$properties
);
}
Expand Down
56 changes: 56 additions & 0 deletions tests/VObject/ITip/BrokerNewEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -574,4 +574,60 @@ public function testNoOrganizerHasAttendee(): void

$this->parse(null, $message, [], 'mailto:[email protected]');
}

public function testAttendeeRemoval(): void
{
$message = <<<ICS
BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
UID:foobar
RRULE:FREQ=DAILY
DTSTART:20140811T220000Z
DTEND:20140811T230000Z
ORGANIZER;CN=Strunk:mailto:[email protected]
ATTENDEE;CN=White:mailto:[email protected]
END:VEVENT
BEGIN:VEVENT
UID:foobar
RECURRENCE-ID:20140812T220000Z
DTSTART:20140812T220000Z
DTEND:20140812T230000Z
ORGANIZER;CN=Strunk:mailto:[email protected]
END:VEVENT
END:VCALENDAR
ICS;

$expectedMessage = <<<ICS
BEGIN:VCALENDAR
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
UID:foobar
RRULE:FREQ=DAILY
DTSTART:20140811T220000Z
DTEND:20140811T230000Z
ORGANIZER;CN=Strunk:mailto:[email protected]
ATTENDEE;CN=White;PARTSTAT=NEEDS-ACTION:mailto:[email protected]
EXDATE:20140812T220000Z
DTSTAMP:**ANY**
END:VEVENT
END:VCALENDAR
ICS;

$expected = [
[
'uid' => 'foobar',
'method' => 'REQUEST',
'component' => 'VEVENT',
'sender' => 'mailto:[email protected]',
'senderName' => 'Strunk',
'recipient' => 'mailto:[email protected]',
'recipientName' => 'White',
'message' => $expectedMessage,
],
];

$this->parse(null, $message, $expected, 'mailto:[email protected]');
}
}
Loading