Added condition when updating event

pull/378/head
nicolas 2021-07-22 01:11:25 +02:00
parent 0a60a62910
commit 936338db3e
1 changed files with 2 additions and 1 deletions

View File

@ -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)