Skip to content

Scheduling infrastructure for absolutely everyone.

Added condition when updating event

nicolas936338db3ec4
diff --git a/lib/calendarClient.ts b/lib/calendarClient.ts
index 662b02e6bad..711cfc14758 100644
--- a/lib/calendarClient.ts
+++ b/lib/calendarClient.ts
@@ -561,7 +561,8 @@ const updateEvent = async (
): Promise<unknown> => {
const parser: CalEventParser = new CalEventParser(calEvent);
const newUid: string = parser.getUid();
- const richEvent: CalendarEvent = parser.asRichEventPlain();
+ const richEvent: CalendarEvent =
+ credential.type === "office365_calendar" ? parser.asRichEvent() : parser.asRichEventPlain();
const updateResult = credential
? await calendars([credential])[0].updateEvent(uidToUpdate, richEvent)