From 936338db3ec4adae08905025a8314fe86ca7d936 Mon Sep 17 00:00:00 2001 From: nicolas Date: Thu, 22 Jul 2021 01:11:25 +0200 Subject: [PATCH] Added condition when updating event --- lib/calendarClient.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/calendarClient.ts b/lib/calendarClient.ts index 662b02e6..711cfc14 100644 --- a/lib/calendarClient.ts +++ b/lib/calendarClient.ts @@ -561,7 +561,8 @@ const updateEvent = async ( ): Promise => { 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)