more fixes for calendar syncs

This commit is contained in:
2022-06-10 14:24:46 +02:00
parent c92077926e
commit 9e4fd6183e
5 changed files with 22 additions and 21 deletions

View File

@@ -69,7 +69,7 @@ class CalendarRangeSyncer
'remoteEventId' => $notification['resource'],
]);
return;
throw $clientException;
}
$lastModified = RemoteEventConverter::convertStringDateWithTimezone($new['lastModifiedDateTime']);

View File

@@ -76,6 +76,8 @@ class CalendarSyncer
'calendarId' => $calendar->getId(),
'remoteEventId' => $notification['resource'],
]);
throw $clientException;
}
if (false === $new['isOrganizer']) {
@@ -142,18 +144,13 @@ class CalendarSyncer
$invite = $calendar->getInviteForUser($user);
switch ($status) {
// none, organizer, tentativelyAccepted, accepted, declined, notResponded.
// possible cases: none, organizer, tentativelyAccepted, accepted, declined, notResponded.
case 'none':
case 'notResponded':
$invite->setStatus(Invite::PENDING);
break;
case 'organizer':
throw new LogicException('should not happens');
break;
case 'tentativelyAccepted':
$invite->setStatus(Invite::TENTATIVELY_ACCEPTED);