Remove attendees from calendar event to work without Domain-Wide Delegation

- Service accounts require Domain-Wide Delegation to invite attendees
- Removed attendees array, sendUpdates, and guest permissions
- Client email still included in event description
- Google Meet link will still be generated successfully
- Can re-enable attendees later if Domain-Wide Delegation is configured
This commit is contained in:
dwindown
2025-12-23 11:37:53 +07:00
parent bc8bc1159d
commit 23f8f70c83

View File

@@ -205,19 +205,14 @@ serve(async (req: Request): Promise<Response> => {
dateTime: endDate.toISOString(), dateTime: endDate.toISOString(),
timeZone: "Asia/Jakarta", timeZone: "Asia/Jakarta",
}, },
attendees: [ // Note: attendees removed because service accounts need Domain-Wide Delegation
{ email: body.client_email }, // Client email is included in description instead
],
conferenceData: { conferenceData: {
createRequest: { createRequest: {
requestId: body.slot_id, requestId: body.slot_id,
conferenceSolutionKey: { type: "hangoutsMeet" }, conferenceSolutionKey: { type: "hangoutsMeet" },
}, },
}, },
sendUpdates: "all",
guestsCanInviteOthers: false,
guestsCanModify: false,
guestsCanSeeOtherGuests: false,
}; };
console.log("Creating event in calendar:", calendarId); console.log("Creating event in calendar:", calendarId);