fix google calendar event not deleted on default calendar of cal event change (#14994)

Co-authored-by: Shaik-Sirajuddin <[email protected]>
Co-authored-by: Udit Takkar <[email protected]>
Co-authored-by: Keith Williams <[email protected]>
Co-authored-by: Amit Sharma <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-07-24 15:34:41 +00:00
1 parent 14bc489d70
commit 059c6c37ba
1 file changed
+1 -4
@@ -484,10 +484,7 @@ export default class GoogleCalendarService implements Calendar {
async deleteEvent(uid: string, event: CalendarEvent, externalCalendarId?: string | null): Promise<void> {
const calendar = await this.authedCalendar();
const selectedCalendar =
(externalCalendarId
? event.destinationCalendar?.find((cal) => cal.externalId === externalCalendarId)?.externalId
: undefined) || "primary";
const selectedCalendar = externalCalendarId || "primary";
try {
const event = await calendar.events.delete({