-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Minimum fix for N Calendar Invites (#14617)
* Remove pushing team member destination calendars * Only create the event on the first destination calendar * Only create event on the first destination calendar
- Loading branch information
1 parent
e3e464a
commit cebbffe
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { DestinationCalendar } from "@prisma/client"; | ||
|
||
import { metadata as OutlookMetadata } from "../../office365calendar"; | ||
|
||
/** | ||
* When inviting attendees to a calendar event, sometimes the external ID is only used for internal purposes | ||
* Need to process the correct external ID for the calendar service | ||
*/ | ||
const processExternalId = (destinationCalendar: DestinationCalendar) => { | ||
if (destinationCalendar.integration === OutlookMetadata.type) { | ||
// Primary email should always be present for Outlook | ||
return destinationCalendar.primaryEmail || destinationCalendar.externalId; | ||
} | ||
|
||
return destinationCalendar.externalId; | ||
}; | ||
|
||
export default processExternalId; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters