Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/api/v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@axiomhq/winston": "^1.2.0",
"@calcom/platform-constants": "*",
"@calcom/platform-enums": "*",
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.333",
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.335",
"@calcom/platform-types": "*",
"@calcom/platform-utils": "*",
"@calcom/prisma": "*",
Expand Down
21 changes: 20 additions & 1 deletion apps/web/app/api/link/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ const querySchema = z.object({
const decryptedSchema = z.object({
bookingUid: z.string(),
userId: z.number().int(),
platformClientId: z.string().optional(),
platformRescheduleUrl: z.string().optional(),
platformCancelUrl: z.string().optional(),
platformBookingUrl: z.string().optional(),
});

// Move the sessionGetter function outside the GET function
Expand Down Expand Up @@ -64,7 +68,14 @@ async function handler(request: NextRequest) {
symmetricDecrypt(decodeURIComponent(token), process.env.CALENDSO_ENCRYPTION_KEY || "")
);

const { bookingUid, userId } = decryptedSchema.parse(decryptedData);
const {
bookingUid,
userId,
platformClientId,
platformRescheduleUrl,
platformCancelUrl,
platformBookingUrl,
} = decryptedSchema.parse(decryptedData);

const booking = await prisma.booking.findUniqueOrThrow({
where: { uid: bookingUid },
Expand Down Expand Up @@ -97,6 +108,14 @@ async function handler(request: NextRequest) {
recurringEventId: booking.recurringEventId || undefined,
confirmed: action === DirectAction.ACCEPT,
reason,
platformClientParams: platformClientId
? {
platformClientId,
platformRescheduleUrl,
platformCancelUrl,
platformBookingUrl,
}
: undefined,
});
} catch (e) {
let message = "Error confirming booking";
Expand Down
9 changes: 8 additions & 1 deletion packages/emails/src/templates/OrganizerRequestEmail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ import { CallToAction, Separator, CallToActionTable } from "../components";
import { OrganizerScheduledEmail } from "./OrganizerScheduledEmail";

export const OrganizerRequestEmail = (props: React.ComponentProps<typeof OrganizerScheduledEmail>) => {
const seedData = { bookingUid: props.calEvent.uid, userId: props.calEvent.organizer.id };
const seedData = {
bookingUid: props.calEvent.uid,
userId: props.calEvent.organizer.id,
platformClientId: props.calEvent.platformClientId,
platformRescheduleUrl: props.calEvent.platformRescheduleUrl,
platformCancelUrl: props.calEvent.platformCancelUrl,
platformBookingUrl: props.calEvent.platformBookingUrl,
};
const token = symmetricEncrypt(JSON.stringify(seedData), process.env.CALENDSO_ENCRYPTION_KEY || "");
//TODO: We should switch to using org domain if available
const actionHref = `${WEBAPP_URL}/api/link/?token=${encodeURIComponent(token)}`;
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2493,7 +2493,7 @@ __metadata:
"@axiomhq/winston": ^1.2.0
"@calcom/platform-constants": "*"
"@calcom/platform-enums": "*"
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.333"
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.335"
"@calcom/platform-types": "*"
"@calcom/platform-utils": "*"
"@calcom/prisma": "*"
Expand Down Expand Up @@ -3553,13 +3553,13 @@ __metadata:
languageName: unknown
linkType: soft

"@calcom/platform-libraries@npm:@calcom/platform-libraries@0.0.333":
version: 0.0.333
resolution: "@calcom/platform-libraries@npm:0.0.333"
"@calcom/platform-libraries@npm:@calcom/platform-libraries@0.0.335":
version: 0.0.335
resolution: "@calcom/platform-libraries@npm:0.0.335"
dependencies:
"@calcom/features": "*"
"@calcom/lib": "*"
checksum: 321c792aeb36ec69b7a02756ac550736bd9a71e4544fcebd9ab625bc2132edd5bf3e86295af05d797ff82de0ec35f3954c7409543e4325b7cbbbb55ce786ef60
checksum: 1c4568a47c118f2e0501a392bc259d1a8ca97d88bd13a53d80655f0eee068152aa9086bc1d90cfad4349268bca3c570a3762d622bff811954d0a84104473b8ce
languageName: node
linkType: hard

Expand Down
Loading