Files
cal.diy/packages/features/tasker/tasks/triggerNoShow/triggerGuestNoShow.ts
T
395381ddcc feat: automatic no show (#16727)
Co-authored-by: Carina Wollendorfer <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: CarinaWolli <[email protected]>
Co-authored-by: zomars <[email protected]>
2024-10-10 10:57:04 -07:00

22 lines
648 B
TypeScript

import { WebhookTriggerEvents } from "@calcom/prisma/enums";
import { calculateMaxStartTime, sendWebhookPayload, prepareNoShowTrigger } from "./common";
export async function triggerGuestNoShow(payload: string): Promise<void> {
const result = await prepareNoShowTrigger(payload);
if (!result) return;
const { webhook, booking, didGuestJoinTheCall } = result;
const maxStartTime = calculateMaxStartTime(booking.startTime, webhook.time, webhook.timeUnit);
if (!didGuestJoinTheCall) {
await sendWebhookPayload(
webhook,
WebhookTriggerEvents.AFTER_GUESTS_CAL_VIDEO_NO_SHOW,
booking,
maxStartTime
);
}
}