Skip to content

Commit

Permalink
fix changing attendee status moves event due missing timezone convers…
Browse files Browse the repository at this point in the history
…ation

The changed status itself is NOT send back to server, therefore it is NOT changed in EGroupware!
  • Loading branch information
ralfbecker committed Jun 9, 2023
1 parent 9c4d1a9 commit 3980eb0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions calendar/inc/class.calendar_zpush.inc.php
Expand Up @@ -540,6 +540,10 @@ function MeetingResponse($folderid, $requestid, $response)
* properties of the StatMessage() item may change via ChangeMessage().
* Note that this function will never be called on E-mail items as you can't change e-mail items, you
* can only set them as 'read'.
*
* At least iOS 16.4 does NOT send any attendee-status via ChangeMessage, therefore the user can not set/change
* the attendee status on the server, after initial response to the meeting-request. No idea why that is ...
* WBXML shows a mail is generated to the organizer, but status is NOT send to the server!
*/
public function ChangeMessage($folderid, $_id, $message, $contentParameters)
{
Expand All @@ -566,7 +570,7 @@ public function ChangeMessage($folderid, $_id, $message, $contentParameters)
ZLog::Write(LOGLEVEL_DEBUG, __METHOD__."('$folderid',$id:$recur_date,".array2string($message).") handling of virtual exception not yet implemented!");
//error_log(__METHOD__."('$folderid',$id:$recur_date,".array2string($message).") handling of virtual exception not yet implemented!");
}
if (!$this->calendar->check_perms($id ? Acl::EDIT : Acl::ADD, $old_event ? $old_event : 0,$account))
if (!$this->calendar->check_perms($id ? Acl::EDIT : Acl::ADD, $old_event ?: 0,$account))
{
// @todo: write in users calendar and make account only a participant
ZLog::Write(LOGLEVEL_DEBUG, __METHOD__."('$folderid',$id,...) no rights to add/edit event!");
Expand All @@ -584,10 +588,14 @@ public function ChangeMessage($folderid, $_id, $message, $contentParameters)
{
$skip_notification = true; // to avoid double notification from client AND Server
}

// event is read in server-time, as is AS message, therefore we need to convert to user-time, which is expected by calendar_boupdate
$this->calendar->server2usertime($event);

$messages = null;
if (!($id = $this->calendar->update($event, true, true, false, true, $messages, $skip_notification)))
{
ZLog::Write(LOGLEVEL_DEBUG, __METHOD__."('$folderid',$id,...) error saving event=".array2string($event)."!");
ZLog::Write(LOGLEVEL_DEBUG, __METHOD__."('$folderid',$id,...) error (".implode(', ', $messages).") saving event=".array2string($event)."!");
return false;
}
// store non-delete exceptions
Expand Down

0 comments on commit 3980eb0

Please sign in to comment.