fix: add check for cal video (#19020)
* fix: add check for cal video * chore: pass location
This commit is contained in:
@@ -67,6 +67,7 @@ export async function handleConfirmation(args: {
|
||||
eventTypeId: number | null;
|
||||
smsReminderNumber: string | null;
|
||||
userId: number | null;
|
||||
location: string | null;
|
||||
};
|
||||
paid?: boolean;
|
||||
emailsEnabled?: boolean;
|
||||
@@ -441,6 +442,7 @@ export async function handleConfirmation(args: {
|
||||
booking: {
|
||||
startTime: booking.startTime,
|
||||
id: booking.id,
|
||||
location: booking.location,
|
||||
},
|
||||
triggerForUser,
|
||||
organizerUser: { id: booking.userId },
|
||||
|
||||
@@ -12,7 +12,6 @@ import {
|
||||
MeetLocationType,
|
||||
OrganizerDefaultConferencingAppType,
|
||||
} from "@calcom/app-store/locations";
|
||||
import { DailyLocationType } from "@calcom/app-store/locations";
|
||||
import { getAppFromSlug } from "@calcom/app-store/utils";
|
||||
import EventManager from "@calcom/core/EventManager";
|
||||
import { getEventName } from "@calcom/core/event";
|
||||
@@ -1983,9 +1982,9 @@ async function handler(
|
||||
}
|
||||
|
||||
try {
|
||||
if (isConfirmedByDefault && (booking.location === DailyLocationType || booking.location?.trim() === "")) {
|
||||
if (isConfirmedByDefault) {
|
||||
await monitorCallbackAsync(scheduleNoShowTriggers, {
|
||||
booking: { startTime: booking.startTime, id: booking.id },
|
||||
booking: { startTime: booking.startTime, id: booking.id, location: booking.location },
|
||||
triggerForUser,
|
||||
organizerUser: { id: organizerUser.id },
|
||||
eventTypeId,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { DailyLocationType } from "@calcom/app-store/locations";
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import tasker from "@calcom/features/tasker";
|
||||
import getWebhooks from "@calcom/features/webhooks/lib/getWebhooks";
|
||||
@@ -7,6 +8,7 @@ type ScheduleNoShowTriggersArgs = {
|
||||
booking: {
|
||||
startTime: Date;
|
||||
id: number;
|
||||
location: string | null;
|
||||
};
|
||||
triggerForUser?: number | true | null;
|
||||
organizerUser: { id: number | null };
|
||||
@@ -29,7 +31,9 @@ export const scheduleNoShowTriggers = async (args: ScheduleNoShowTriggersArgs) =
|
||||
isDryRun = false,
|
||||
} = args;
|
||||
|
||||
if (isDryRun) return;
|
||||
const isCalVideoLocation = booking.location === DailyLocationType || booking.location?.trim() === "";
|
||||
|
||||
if (isDryRun || !isCalVideoLocation) return;
|
||||
|
||||
// Add task for automatic no show in cal video
|
||||
const noShowPromises: Promise<any>[] = [];
|
||||
|
||||
Reference in New Issue
Block a user