Skip to content

Commit

Permalink
SCHEDULE-STATUS must only contain a status code.
Browse files Browse the repository at this point in the history
Fixes #177.
  • Loading branch information
evert committed Jan 6, 2015
1 parent d563f55 commit 317eac6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ ChangeLog

* #168: Expanding calendars now removes objects with recurrence rules that
don't have a valid recurrence instance.
* #177: SCHEDULE-STATUS should not contain a reason phrase, only a status
code.


3.3.4 (2014-11-19)
Expand Down
3 changes: 2 additions & 1 deletion lib/ITip/Broker.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ protected function processMessageReply(Message $itipMessage, VCalendar $existing
return null;
}
$instances = array();
$requestStatus = '2.0;Success';
$requestStatus = '2.0';

// Finding all the instances the attendee replied to.
foreach($itipMessage->message->VEVENT as $vevent) {
Expand All @@ -350,6 +350,7 @@ protected function processMessageReply(Message $itipMessage, VCalendar $existing
$instances[$recurId] = $attendee['PARTSTAT']->getValue();
if (isset($vevent->{'REQUEST-STATUS'})) {
$requestStatus = $vevent->{'REQUEST-STATUS'}->getValue();
list($requestStatus) = explode(';', $requestStatus);
}
}

Expand Down
9 changes: 3 additions & 6 deletions tests/VObject/ITip/BrokerProcessReplyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ function testReplyAccept() {
BEGIN:VEVENT
SEQUENCE:2
UID:foobar
ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS="2.0;Success":mailto:foo@example
.org
ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:foo@example.org
ORGANIZER:mailto:bar@example.org
END:VEVENT
END:VCALENDAR
Expand Down Expand Up @@ -105,8 +104,7 @@ function testReplyRequestStatus() {
BEGIN:VEVENT
UID:foobar
SEQUENCE:2
ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS="2.3;foo-bar!":mailto:foo@exampl
e.org
ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.3:mailto:foo@example.org
ORGANIZER:mailto:bar@example.org
END:VEVENT
END:VCALENDAR
Expand Down Expand Up @@ -414,8 +412,7 @@ function testReplyAcceptUpdateRSVP() {
BEGIN:VEVENT
SEQUENCE:2
UID:foobar
ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS="2.0;Success":mailto:foo@example
.org
ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:foo@example.org
ORGANIZER:mailto:bar@example.org
END:VEVENT
END:VCALENDAR
Expand Down

0 comments on commit 317eac6

Please sign in to comment.