fix: meeting url missing in workflow email (#16434)
Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
This commit is contained in:
co-authored by
CarinaWolli
Joe Au-Yeung
parent
eb472cba36
commit
e9c71abd6f
@@ -25,7 +25,11 @@ import prisma, { bookingMinimalSelect } from "@calcom/prisma";
|
||||
import type { WebhookTriggerEvents } from "@calcom/prisma/enums";
|
||||
import { BookingStatus } from "@calcom/prisma/enums";
|
||||
import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";
|
||||
import { EventTypeMetaDataSchema, schemaBookingCancelParams } from "@calcom/prisma/zod-utils";
|
||||
import {
|
||||
bookingMetadataSchema,
|
||||
EventTypeMetaDataSchema,
|
||||
schemaBookingCancelParams,
|
||||
} from "@calcom/prisma/zod-utils";
|
||||
import type { EventTypeMetadata } from "@calcom/prisma/zod-utils";
|
||||
import {
|
||||
deleteAllWorkflowReminders,
|
||||
@@ -359,6 +363,7 @@ async function handler(req: CustomRequest) {
|
||||
smsReminderNumber: bookingToDelete.smsReminderNumber,
|
||||
evt: {
|
||||
...evt,
|
||||
metadata: { videoCallUrl: bookingMetadataSchema.parse(bookingToDelete.metadata || {})?.videoCallUrl },
|
||||
...{
|
||||
eventType: {
|
||||
slug: bookingToDelete.eventType?.slug,
|
||||
|
||||
@@ -462,6 +462,8 @@ export const roundRobinReassignment = async ({ bookingId }: { bookingId: number
|
||||
},
|
||||
});
|
||||
|
||||
const workflowEventMetadata = { videoCallUrl: getVideoCallUrlFromCalEvent(evt) };
|
||||
|
||||
for (const workflowReminder of workflowReminders) {
|
||||
const workflowStep = workflowReminder?.workflowStep;
|
||||
const workflow = workflowStep?.workflow;
|
||||
@@ -470,6 +472,7 @@ export const roundRobinReassignment = async ({ bookingId }: { bookingId: number
|
||||
await scheduleEmailReminder({
|
||||
evt: {
|
||||
...evt,
|
||||
metadata: workflowEventMetadata,
|
||||
eventType,
|
||||
},
|
||||
action: WorkflowActions.EMAIL_HOST,
|
||||
@@ -531,8 +534,6 @@ export const roundRobinReassignment = async ({ bookingId }: { bookingId: number
|
||||
},
|
||||
});
|
||||
|
||||
const workflowEventMetadata = { videoCallUrl: getVideoCallUrlFromCalEvent(evt) };
|
||||
|
||||
await scheduleWorkflowReminders({
|
||||
workflows: newEventWorkflows,
|
||||
smsReminderNumber: null,
|
||||
|
||||
@@ -254,6 +254,7 @@ export const activateEventTypeHandler = async ({ ctx, input }: ActivateEventType
|
||||
schedulingType: booking.eventType?.schedulingType,
|
||||
hosts: booking.eventType?.hosts,
|
||||
},
|
||||
metadata: booking.metadata,
|
||||
};
|
||||
for (const step of eventTypeWorkflow.steps) {
|
||||
if (
|
||||
|
||||
@@ -53,6 +53,7 @@ export const bookingSelect = {
|
||||
endTime: true,
|
||||
title: true,
|
||||
uid: true,
|
||||
metadata: true,
|
||||
attendees: {
|
||||
select: {
|
||||
name: true,
|
||||
@@ -751,6 +752,7 @@ export async function scheduleBookingReminders(
|
||||
schedulingType: booking.eventType?.schedulingType,
|
||||
hosts: booking.eventType?.hosts,
|
||||
},
|
||||
metadata: booking.metadata,
|
||||
};
|
||||
if (
|
||||
step.action === WorkflowActions.EMAIL_HOST ||
|
||||
|
||||
Reference in New Issue
Block a user