Commit 4d8e1e81 authored by Manfred Kutas's avatar Manfred Kutas

ZP-1020 Appointments as meetings on android devices.

Released under the Affero GNU General Public License (AGPL) version 3.
parent f8cae55d
...@@ -316,6 +316,20 @@ class MAPIProvider { ...@@ -316,6 +316,20 @@ class MAPIProvider {
$message->responsetype = $messageprops[$appointmentprops["responsestatus"]]; $message->responsetype = $messageprops[$appointmentprops["responsestatus"]];
} }
// If it's an appointment which doesn't have any attendees, we have to make sure that
// the user is the owner or it will not work properly with android devices
// @see https://jira.z-hub.io/browse/ZP-1020
if(isset($messageprops[$appointmentprops["meetingstatus"]]) && $messageprops[$appointmentprops["meetingstatus"]] == olNonMeeting && empty($message->attendees)) {
$meinfo = mapi_zarafa_getuser_by_name($this->store, Request::GetAuthUser());
if (is_array($meinfo)) {
$message->organizeremail = w2u($meinfo["emailaddress"]);
$message->organizername = w2u($meinfo["fullname"]);
ZLog::Write(LOGLEVEL_DEBUG, "MAPIProvider->getAppointment(): setting ourself as the organizer for an appointment without attendees.");
}
}
if (!isset($message->nativebodytype)) $message->nativebodytype = $this->getNativeBodyType($messageprops); if (!isset($message->nativebodytype)) $message->nativebodytype = $this->getNativeBodyType($messageprops);
// If the user is working from a location other than the office the busystatus should be interpreted as free. // If the user is working from a location other than the office the busystatus should be interpreted as free.
......
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