fix: adds triggerEvent attribute to meeting ended webhook (#9806)

This commit is contained in:
Pradumn Kumar authored and GitHub committed 2023-06-26 14:35:32 -04:00
1 parent 8da68cc1fe
commit 1510740cb2
1 file changed
+2 -1
@@ -1,6 +1,7 @@
import schedule from "node-schedule";
import prisma from "@calcom/prisma";
import { WebhookTriggerEvents } from "@calcom/prisma/enums";
export async function scheduleTrigger(
booking: { id: number; endTime: Date; scheduledJobs: string[] },
@@ -13,7 +14,7 @@ export async function scheduleTrigger(
`${subscriber.appId}_${subscriber.id}`,
booking.endTime,
async function () {
const body = JSON.stringify(booking);
const body = JSON.stringify({ triggerEvent: WebhookTriggerEvents.MEETING_ENDED, ...booking });
await fetch(subscriberUrl, {
method: "POST",
body,