fix: different calendar hosts (#24000)
* fis: pass the missing `platformClientId` to `handleNewBooking` in api/v2 * Update formatCalendarEvent.ts * only add the externald in case of same calendar, otherwise add if from the .ics file sent in email * Revert "fis: pass the missing `platformClientId` to `handleNewBooking` in api/v2" This reverts commit 030ac0f0981c1135d4973fbdafa62d58e8985831. * fix: alow the host change logic to run for collective envets as well * fix: run the changedOrganizer logic for both collective and round-robin events * Update handleNewBooking.ts * fix: failing unit test --------- Co-authored-by: Lauris Skraucis <[email protected]>
This commit is contained in:
1 parent
43cc40d7fe
commit
52a5afeba5
4 files changed
+13
-13
No files matched your search
@@ -17,10 +17,12 @@ const formatClientIdFromEmails = (calEvent: CalendarEvent | ExtendedCalendarEven
|
||||
const team = calEvent.team
|
||||
? {
|
||||
...calEvent.team,
|
||||
members: calEvent.team.members.map((member) => ({
|
||||
...member,
|
||||
email: member.email.replace(`+${clientId}`, ""),
|
||||
})),
|
||||
members: calEvent.team.members.map((member) => {
|
||||
return {
|
||||
...member,
|
||||
email: member.email.replace(`+${clientId}`, ""),
|
||||
};
|
||||
}),
|
||||
}
|
||||
: undefined;
|
||||
return [attendees, organizer, team];
|
||||
@@ -39,8 +41,8 @@ export const formatCalEvent = (calEvent: CalendarEvent) => {
|
||||
export const formatCalEventExtended = (calEvent: ExtendedCalendarEvent) => {
|
||||
const clonedEvent = cloneDeep(calEvent);
|
||||
if (clonedEvent.platformClientId) {
|
||||
const [attendees, organizer] = formatClientIdFromEmails(clonedEvent, clonedEvent.platformClientId);
|
||||
Object.assign(clonedEvent, { attendees, organizer });
|
||||
const [attendees, organizer, team] = formatClientIdFromEmails(clonedEvent, clonedEvent.platformClientId);
|
||||
Object.assign(clonedEvent, { attendees, organizer, team });
|
||||
}
|
||||
|
||||
return clonedEvent;
|
||||
|
||||
Reference in new issue
Block a user