feat: support no show webhook for instant meetings (#21251)

* feat: support no show webhook for instant meetings

* fix: type error
This commit is contained in:
Udit Takkar
2025-05-19 13:05:06 +04:00
committed by GitHub
parent 19c72323b8
commit e5f8d4a1ac
@@ -1,5 +1,6 @@
import { sendScheduledEmailsAndSMS } from "@calcom/emails";
import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";
import { scheduleNoShowTriggers } from "@calcom/features/bookings/lib/handleNewBooking/scheduleNoShowTriggers";
import { isPrismaObjOrUndefined } from "@calcom/lib/isPrismaObj";
import { getTranslation } from "@calcom/lib/server/i18n";
import { getTimeFormatStringFromUserTimeFormat } from "@calcom/lib/timeFormat";
@@ -233,5 +234,18 @@ export const Handler = async ({ ctx, input }: Options) => {
eventTypeMetadata
);
await scheduleNoShowTriggers({
booking: {
startTime: updatedBooking.startTime,
id: updatedBooking.id,
location: updatedBooking.location,
},
triggerForUser: !eventType?.teamId || (eventType?.teamId && eventType?.parentId),
organizerUser: { id: user.id },
eventTypeId: eventType?.id ?? null,
teamId: eventType?.teamId,
orgId: user.organizationId,
});
return { isBookingAlreadyAcceptedBySomeoneElse, meetingUrl: locationVideoCallUrl };
};