Commit 5779cca8 authored by mku's avatar mku

ZP-276 #comment IOS6 meeting hijacking

git-svn-id: https://z-push.org/svn/z-push/trunk@1503 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 4d4b2ed2
...@@ -289,6 +289,25 @@ class MAPIProvider { ...@@ -289,6 +289,25 @@ class MAPIProvider {
array_push($message->attendees, $attendee); array_push($message->attendees, $attendee);
} }
// Status 0 = no meeting, status 1 = organizer, status 2/3/4/5 = tentative/accepted/declined/notresponded
if(isset($messageprops[$appointmentprops["meetingstatus"]]) && $messageprops[$appointmentprops["meetingstatus"]] > 1) {
// Work around iOS6 cancellation issue when there are no attendees for this meeting. Just add ourselves as the sole attendee.
if(count($message->attendees) == 0) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("MAPIProvider->getAppointment: adding ourself as an attendee for iOS6 workaround"));
$attendee = new SyncAttendee();
$meinfo = mapi_zarafa_getuser_by_name($this->store, Request::GetAuthUser());
if (is_array($meinfo)) {
$attendee->email = w2u($meinfo["emailaddress"]);
$attendee->mame = w2u($meinfo["fullname"]);
$attendee->attendeetype = MAPI_TO;
array_push($message->attendees, $attendee);
}
}
}
if (!isset($message->nativebodytype)) $message->nativebodytype = $this->getNativeBodyType($messageprops); if (!isset($message->nativebodytype)) $message->nativebodytype = $this->getNativeBodyType($messageprops);
return $message; return $message;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment