fix: webhooks for managed event types (#10958)

Co-authored-by: CarinaWolli <[email protected]>
Co-authored-by: Omar López <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-08-26 00:27:05 +00:00
1 parent a810a538e9
commit 83aea7d28c
8 files changed
+36 -14

No files matched your search

@@ -248,9 +248,12 @@ export const requestRescheduleHandler = async ({ ctx, input }: RequestReschedule
parentId: bookingToReschedule?.eventType?.parentId ?? null,
},
});
const triggerForUser = !teamId || (teamId && bookingToReschedule.eventType?.parentId);
// Send Webhook call if hooked to BOOKING.CANCELLED
const subscriberOptions = {
userId: bookingToReschedule.userId,
userId: triggerForUser ? bookingToReschedule.userId : null,
eventTypeId: bookingToReschedule.eventTypeId as number,
triggerEvent: eventTrigger,
teamId,