-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Fixing ICS file in workflows & ICS calendar descriptions #16731
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the title
, subtitle
, role
, and isRequestRescheduled
params as they are not needed anymore.
@@ -283,7 +282,9 @@ async function handler(req: NextApiRequest, res: NextApiResponse) { | |||
attachments: reminder.workflowStep.includeCalendarEvent | |||
? [ | |||
{ | |||
content: Buffer.from(getiCalEventAsString(reminder.booking) || "").toString("base64"), | |||
content: Buffer.from( | |||
generateIcsString({ event: reminder.booking, status: "CONFIRMED" }) || "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assume that we only schedule workflow emails for confirmed bookings.
@@ -258,12 +207,8 @@ export const scheduleEmailReminder = async (args: scheduleEmailReminderArgs) => | |||
const batchId = await getBatchId(); | |||
|
|||
function sendEmail(data: Partial<MailData>, triggerEvent?: WorkflowTriggerEvents) { | |||
const status: ParticipationStatus = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This status should be for the whole event and not just an attendee.
@@ -258,12 +207,8 @@ export const scheduleEmailReminder = async (args: scheduleEmailReminderArgs) => | |||
const batchId = await getBatchId(); | |||
|
|||
function sendEmail(data: Partial<MailData>, triggerEvent?: WorkflowTriggerEvents) { | |||
const status: ParticipationStatus = | |||
triggerEvent === WorkflowTriggerEvents.AFTER_EVENT | |||
? "COMPLETED" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
COMPLETED
is not part of the ICS standard. Most calendars handle bookings in the past on their own
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (09/19/24)1 reviewer was added to this PR based on Keith Williams's automation. |
What does this PR do?
For our emails we use
generateIcsString()
while in workflows they had their own function to generate ICS strings. We should keep the calendar events unified. By doing this we solve two problemsBefore
After
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Checklist