fix: platform confirmed/declined meeting attendee reschedule email url (#23335)
* fix: platform confirmed/declined meeting attendee reschedule email url * chore: bump platform libraries
This commit is contained in:
1 parent
67befea66e
commit
d0e59f1824
4 files changed
+34
-8
No files matched your search
@@ -38,7 +38,7 @@
|
||||
"@axiomhq/winston": "^1.2.0",
|
||||
"@calcom/platform-constants": "*",
|
||||
"@calcom/platform-enums": "*",
|
||||
"@calcom/platform-libraries": "npm:@calcom/[email protected]3",
|
||||
"@calcom/platform-libraries": "npm:@calcom/[email protected]5",
|
||||
"@calcom/platform-types": "*",
|
||||
"@calcom/platform-utils": "*",
|
||||
"@calcom/prisma": "*",
|
||||
|
||||
@@ -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
|
||||
@@ -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 },
|
||||
@@ -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";
|
||||
|
||||
@@ -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)}`;
|
||||
|
||||
@@ -2493,7 +2493,7 @@ __metadata:
|
||||
"@axiomhq/winston": ^1.2.0
|
||||
"@calcom/platform-constants": "*"
|
||||
"@calcom/platform-enums": "*"
|
||||
"@calcom/platform-libraries": "npm:@calcom/[email protected]3"
|
||||
"@calcom/platform-libraries": "npm:@calcom/[email protected]5"
|
||||
"@calcom/platform-types": "*"
|
||||
"@calcom/platform-utils": "*"
|
||||
"@calcom/prisma": "*"
|
||||
@@ -3553,13 +3553,13 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@calcom/platform-libraries@npm:@calcom/[email protected]3":
|
||||
version: 0.0.333
|
||||
resolution: "@calcom/platform-libraries@npm:0.0.333"
|
||||
"@calcom/platform-libraries@npm:@calcom/[email protected]5":
|
||||
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
|
||||
|
||||
|
||||
Reference in new issue
Block a user