mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch 'calendar/fix-loading-msgraph-events' into 'master'
Fix: small fixes for remote calendars See merge request Chill-Projet/chill-bundles!521
This commit is contained in:
commit
929c9f4f72
@ -76,7 +76,7 @@ class MapAndSubscribeUserCalendarCommand extends Command
|
|||||||
'expiration' => $expiration->format(DateTimeImmutable::ATOM),
|
'expiration' => $expiration->format(DateTimeImmutable::ATOM),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
while ($offset < ($total - 1)) {
|
while ($offset < $total) {
|
||||||
$users = $this->userRepository->findByMostOldSubscriptionOrWithoutSubscriptionOrData(
|
$users = $this->userRepository->findByMostOldSubscriptionOrWithoutSubscriptionOrData(
|
||||||
$interval,
|
$interval,
|
||||||
$limit,
|
$limit,
|
||||||
|
@ -107,8 +107,8 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
|
|||||||
'users/' . $userId . '/calendarView',
|
'users/' . $userId . '/calendarView',
|
||||||
[
|
[
|
||||||
'query' => [
|
'query' => [
|
||||||
'startDateTime' => $startDate->format(DateTimeImmutable::ATOM),
|
'startDateTime' => $startDate->setTimezone(RemoteEventConverter::getRemoteTimeZone())->format(RemoteEventConverter::getRemoteDateTimeSimpleFormat()),
|
||||||
'endDateTime' => $endDate->format(DateTimeImmutable::ATOM),
|
'endDateTime' => $endDate->setTimezone(RemoteEventConverter::getRemoteTimeZone())->format(RemoteEventConverter::getRemoteDateTimeSimpleFormat()),
|
||||||
'$count' => 'true',
|
'$count' => 'true',
|
||||||
'$top' => 0,
|
'$top' => 0,
|
||||||
],
|
],
|
||||||
@ -181,8 +181,8 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
|
|||||||
'users/' . $userId . '/calendarView',
|
'users/' . $userId . '/calendarView',
|
||||||
[
|
[
|
||||||
'query' => [
|
'query' => [
|
||||||
'startDateTime' => $startDate->format(DateTimeImmutable::ATOM),
|
'startDateTime' => $startDate->setTimezone(RemoteEventConverter::getRemoteTimeZone())->format(RemoteEventConverter::getRemoteDateTimeSimpleFormat()),
|
||||||
'endDateTime' => $endDate->format(DateTimeImmutable::ATOM),
|
'endDateTime' => $endDate->setTimezone(RemoteEventConverter::getRemoteTimeZone())->format(RemoteEventConverter::getRemoteDateTimeSimpleFormat()),
|
||||||
'$select' => 'id,subject,start,end,isAllDay',
|
'$select' => 'id,subject,start,end,isAllDay',
|
||||||
'$top' => $limit,
|
'$top' => $limit,
|
||||||
'$skip' => $offset,
|
'$skip' => $offset,
|
||||||
@ -539,10 +539,13 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
|
|||||||
$userId = $this->mapCalendarToUser->getUserId($user);
|
$userId = $this->mapCalendarToUser->getUserId($user);
|
||||||
|
|
||||||
if (null === $userId) {
|
if (null === $userId) {
|
||||||
throw new Exception('no remote calendar for this user', [
|
throw new Exception(
|
||||||
'user' => $user->getId(),
|
sprintf(
|
||||||
'remoteId' => $remoteId,
|
'no remote calendar for this user: %s, remoteid: %s',
|
||||||
]);
|
$user->getId(),
|
||||||
|
$remoteId
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user