Skip to content

Commit

Permalink
Don't ignore the client-provided UID for EAS meeting requests.
Browse files Browse the repository at this point in the history
Fixes the issue where the iTip request generated by the EAS client
and the iTip responses generated by the email client were mismatched
with the UID generated by Kronolith when the event was imported.
  • Loading branch information
mrubinsk committed Dec 7, 2014
1 parent b402f7e commit 05b9658
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Expand Up @@ -390,10 +390,14 @@ public function getSubject()
}

/**
* Set the appointment uid. Note that this is the client's UID value, and not
* the value that the server uses for the UID. ActiveSync messages do not
* include any server uid value as part of the message natively.
*
* Set the appointment uid. Note that this is the client's UID value, and
* not the value that the server normally uses for the UID. ActiveSync
* messages do not normally include any server uid value as part of the
* message directly. This causes issues with meeting requests since most
* clients will use the CLIENT_ENTRY_ID for this value, and will send the
* invitation email out using this value as the UID so we sort-of HAVE to
* use this value as the server's UID.
*
* @param string $uid The server's uid for this appointment
*/
public function setUid($uid)
Expand Down
6 changes: 6 additions & 0 deletions kronolith/lib/Event.php
Expand Up @@ -1490,6 +1490,12 @@ public function fromASAppointment(Horde_ActiveSync_Message_Appointment $message)
if ($this->id === null) {
$this->creator = $GLOBALS['registry']->getAuth();
}

/* Meeting requests come with their own UID value. */
if (empty($this->uid) && !empty($message->getUid())) {
$this->uid = $message->getUid();
}

if (strlen($title = $message->getSubject())) {
$this->title = $title;
}
Expand Down

0 comments on commit 05b9658

Please sign in to comment.