Skip to content

Commit

Permalink
Add RSVP parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jan 28, 2015
1 parent a641081 commit c36b972
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions framework/Compress/lib/Horde/Compress/Tnef.php
Expand Up @@ -110,6 +110,7 @@ class Horde_Compress_Tnef extends Horde_Compress_Base
// Do we need this?
const MAPI_BUSY_STATUS = 0x8205;

const MAPI_RESPONSE_REQUESTED = 0x0063;
const MAPI_APPOINTMENT_UID = 0x001f;
const MAPI_APPOINTMENT_LOCATION = 0x8208;
const MAPI_APPOINTMENT_URL = 0x8209;
Expand Down
16 changes: 16 additions & 0 deletions framework/Compress/lib/Horde/Compress/Tnef/Icalendar.php
Expand Up @@ -150,6 +150,12 @@ class Horde_Compress_Tnef_ICalendar extends Horde_Compress_Tnef_Object
*/
protected $_description;

/**
* RSVP property
*
* @var boolean
*/
protected $_rsvp = false;
/**
* MIME type.
*
Expand Down Expand Up @@ -201,15 +207,19 @@ public function setMethod($method, $class = null)
switch ($class) {
case Horde_Compress_Tnef::IPM_MEETING_RESPONSE_TENT:
$this->_partStat = self::PART_TENTATIVE;
$this->_rsvp = false;
break;
case Horde_Compress_Tnef::IPM_MEETING_RESPONSE_NEG:
$this->_partStat = self::PART_DECLINE;
$this->_rsvp = false;
break;
case Horde_Compress_Tnef::IPM_MEETING_RESPONSE_POS:
$this->_partStat = self::PART_ACCEPTED;
$this->_rsvp = false;
break;
case Horde_Compress_Tnef::IPM_MEETING_REQUEST:
$this->_partStat =self::PART_ACTION;
$this->_rsvp = true;
break;
}
}
Expand Down Expand Up @@ -334,6 +344,9 @@ public function setMapiAttribute($type, $name, $value)
case Horde_Compress_Tnef::MAPI_COMPRESSED:
$this->_description = $value;
break;
case Horde_Compress_Tnef::MAPI_RESPONSE_REQUESTED:
$this->_rsvp = $value;
break;
}
}

Expand Down Expand Up @@ -511,6 +524,9 @@ protected function _toItip()
if (!empty($this->_partStat)) {
$params['PARTSTAT'] = $this->_partStat;
}
if ($this->_rsvp) {
$params['RSVP'] = 'TRUE';
}
$vEvent->setAttribute('ATTENDEE', $email->bare_address, $params);
}
}
Expand Down

0 comments on commit c36b972

Please sign in to comment.