Skip to content

Commit

Permalink
AS16.1 - Use ClientUID if transmitted
Browse files Browse the repository at this point in the history
AS16.1 changes based on grommunio-sync commit
grommunio/grommunio-sync@171677a
  • Loading branch information
matidau committed Nov 1, 2024
1 parent a1db684 commit c1f265d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/backend/kopano/mapiprovider.php
Original file line number Diff line number Diff line change
Expand Up @@ -1311,10 +1311,14 @@ private function setAppointment($mapimessage, $appointment) {
$instanceid = $appointment->parseDate($appointment->instanceid);
$basedate = $this->getDayStartOfTimestamp($instanceid);
// get compatible TZ data
$props = [ $appointmentprops["timezonetag"] ];
$props = [ $appointmentprops["timezonetag"], $appointmentprops["isrecurring"] ];
$tzprop = $this->getProps($mapimessage, $props);
$tz = $this->getTZFromMAPIBlob($tzprop[$appointmentprops["timezonetag"]]);

if ($appointmentprops["isrecurring"] == false) {
SLog::Write(LOGLEVEL_INFO, sprintf("MAPIProvider->setAppointment(): Cannot modify exception instanceId '%s' as target appointment is not recurring. Ignoring.", $appointment->instanceid));
return false;
}
// get a recurrence object
$recurrence = new Recurrence($this->store, $mapimessage);
// check if the exception is to be deleted
Expand Down Expand Up @@ -1419,7 +1423,10 @@ private function setAppointment($mapimessage, $appointment) {

// is the transmitted UID OL compatible?
// if not, encapsulate the transmitted uid
$appointment->uid = Utils::GetOLUidFromICalUid($appointment->uid);
if ($appointment->uid && substr($appointment->uid, 0, 16) != "040000008200E000") {
// if not, encapsulate the transmitted uid
$appointment->uid = Utils::GetOLUidFromICalUid($appointment->uid);
}

// if there was a clientuid transport the new UID to the response
if ($appointment->clientuid) {
Expand Down Expand Up @@ -1575,6 +1582,8 @@ private function setAppointment($mapimessage, $appointment) {
}
else {
$props[$appointmentprops["isrecurring"]] = false;
// remove recurringstate
mapi_deleteprops($mapimessage, [$appointmentprops["recurringstate"]]);
}

//always set the PR_SENT_REPRESENTING_* props so that the attendee status update also works with the webaccess
Expand Down

0 comments on commit c1f265d

Please sign in to comment.