Revert: remove attendee invitations from calendar events

Google API forbids attendees on service account events without
Domain-Wide Delegation (requires Google Workspace). Reverts to
direct event creation which works with personal Gmail calendars.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 14:58:45 +01:00
co-authored by Claude Sonnet 4.6
parent 06e25183da
commit 3561aa30bb
2 changed files with 12 additions and 28 deletions
+4 -4
View File
@@ -451,11 +451,11 @@ class Pages extends CI_Controller {
$workerEventId = null;
$ownerEventId = null;
if(!empty($worker->google_calendar_id)){
$workerEventId = $this->googlecalendar->createEvent($worker->google_calendar_id, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd, $worker->google_calendar_id);
$workerEventId = $this->googlecalendar->createEvent($worker->google_calendar_id, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd);
}
$evelinCalId = $this->config->item('gcal_evelin_calendar_id');
if(!empty($evelinCalId)){
$ownerEventId = $this->googlecalendar->createEvent($evelinCalId, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd, $evelinCalId);
$ownerEventId = $this->googlecalendar->createEvent($evelinCalId, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd);
}
$this->Service_model->updateBookingCalEvents($newBooking->booking_id, $workerEventId, $ownerEventId);
}
@@ -873,10 +873,10 @@ class Pages extends CI_Controller {
$newWorkerEventId = null;
$newOwnerEventId = null;
if(!empty($worker->google_calendar_id)){
$newWorkerEventId = $this->googlecalendar->createEvent($worker->google_calendar_id, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd, $worker->google_calendar_id);
$newWorkerEventId = $this->googlecalendar->createEvent($worker->google_calendar_id, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd);
}
if(!empty($evelinCalId)){
$newOwnerEventId = $this->googlecalendar->createEvent($evelinCalId, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd, $evelinCalId);
$newOwnerEventId = $this->googlecalendar->createEvent($evelinCalId, $gcalTitle, $gcalDescription, $gcalStart, $gcalEnd);
}
$this->Service_model->updateBookingCalEvents($booking->booking_id, $newWorkerEventId, $newOwnerEventId);