Commit 097cd43e authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1307 Revert "ZP-1013 iOS does not send meeting response."

This reverts commit cf361656.

Released under the Affero GNU General Public License (AGPL) version 3.

Conflicts:
	src/backend/kopano/mapiprovider.php
	src/lib/request/request.php
parent 2fd7b0ba
...@@ -594,17 +594,8 @@ class MAPIProvider { ...@@ -594,17 +594,8 @@ class MAPIProvider {
$props = $this->getProps($mapimessage, $meetingrequestproperties); $props = $this->getProps($mapimessage, $meetingrequestproperties);
// Get the GOID // Get the GOID
if(isset($props[$meetingrequestproperties["goidtag"]])) { if(isset($props[$meetingrequestproperties["goidtag"]]))
$req = new Meetingrequest($this->store, $mapimessage, $this->session);
$items = $req->findCalendarItems($props[$meetingrequestproperties["goidtag"]]);
// GlobalObjId support was removed in AS 16.0
if (Request::IsGlobalObjIdHexClient() && !empty($items)) {
$message->meetingrequest->globalobjid = strtoupper(bin2hex($props[$meetingrequestproperties["goidtag"]]));
}
else {
$message->meetingrequest->globalobjid = base64_encode($props[$meetingrequestproperties["goidtag"]]); $message->meetingrequest->globalobjid = base64_encode($props[$meetingrequestproperties["goidtag"]]);
}
}
// Set Timezone // Set Timezone
if(isset($props[$meetingrequestproperties["timezonetag"]])) if(isset($props[$meetingrequestproperties["timezonetag"]]))
......
...@@ -632,30 +632,6 @@ class Request { ...@@ -632,30 +632,6 @@ class Request {
return (time() - $_SERVER["REQUEST_TIME"]) >= self::GetExpectedConnectionTimeout(); return (time() - $_SERVER["REQUEST_TIME"]) >= self::GetExpectedConnectionTimeout();
} }
/**
* Checks the device type if it expects the globalobjid in meeting requests encoded as hex.
* If it's not the case, globalobjid will be base64 encoded.
*
* iOS device since 9.3 (?) version expect globalobjid to be hex encoded.
* @see https://jira.z-hub.io/projects/ZP/issues/ZP-1013
*
* @access public
* @return boolean
*/
static public function IsGlobalObjIdHexClient() {
switch (self::GetDeviceType()) {
case "iPod":
case "iPad":
case "iPhone":
$matches = array();
if (stripos(self::GetUserAgent(), "Apple-") == 0 && preg_match("/\/(\d{4})\./", self::GetUserAgent(), $matches) && isset($matches[1]) && $matches[1] >= 1305) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("Request->IsGlobalObjIdHexClient(): %s->%s", self::GetDeviceType(), self::GetUserAgent()));
return true;
}
}
return false;
}
/**---------------------------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------------------------
* Private stuff * Private stuff
*/ */
......
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