fix: platform cancel booking webhook not triggered (#16827)

* fix: pass oauth id to webhooks upon cancel booking

* chore: v2 use latest libraries
This commit is contained in:
Lauris Skraucis
2024-09-26 14:49:53 +00:00
committed by GitHub
parent e43690f190
commit e4dc2d0877
4 changed files with 5669 additions and 73 deletions
+1 -1
View File
@@ -28,7 +28,7 @@
"dependencies": {
"@calcom/platform-constants": "*",
"@calcom/platform-enums": "*",
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.40",
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.41",
"@calcom/platform-libraries-0.0.2": "npm:@calcom/platform-libraries@0.0.2",
"@calcom/platform-types": "*",
"@calcom/platform-utils": "*",
@@ -9,6 +9,7 @@ import { sendCancelledEmailsAndSMS } from "@calcom/emails";
import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";
import { workflowSelect } from "@calcom/features/ee/workflows/lib/getAllWorkflows";
import { sendCancelledReminders } from "@calcom/features/ee/workflows/lib/reminders/reminderScheduler";
import type { GetSubscriberOptions } from "@calcom/features/webhooks/lib/getWebhooks";
import getWebhooks from "@calcom/features/webhooks/lib/getWebhooks";
import { deleteWebhookScheduledTriggers } from "@calcom/features/webhooks/lib/scheduleTrigger";
import sendPayload from "@calcom/features/webhooks/lib/sendOrSchedulePayload";
@@ -207,13 +208,15 @@ async function handler(req: CustomRequest) {
const orgId = await getOrgIdFromMemberOrTeamId({ memberId: organizerUserId, teamId });
const subscriberOptions = {
const subscriberOptions: GetSubscriberOptions = {
userId: organizerUserId,
eventTypeId: bookingToDelete.eventTypeId as number,
triggerEvent: eventTrigger,
teamId,
orgId,
oAuthClientId: platformClientId,
};
const eventTypeInfo: EventTypeInfo = {
eventTitle: bookingToDelete?.eventType?.title || null,
eventDescription: bookingToDelete?.eventType?.description || null,
+3
View File
@@ -1,3 +1,6 @@
## 0.0.41
Released to support handle cancel booking passing oauth client id to webhooks.
## 0.0.38
#### Feature: Added Support for AdvancedTab Event-Type Attributes in API
- **Booker Layouts**:
+5661 -71
View File
File diff suppressed because it is too large Load Diff