From e4eb21bf8d7651fc4244dc2c86e28553a65df494 Mon Sep 17 00:00:00 2001 From: Nafees Nazik <84864519+G3root@users.noreply.github.com> Date: Wed, 22 Mar 2023 15:47:19 +0530 Subject: [PATCH] fix: metadata get lost when rescheduling (#7873) --- packages/features/bookings/lib/handleNewBooking.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.ts index 95aa37aa15..4f6beb8a77 100644 --- a/packages/features/bookings/lib/handleNewBooking.ts +++ b/packages/features/bookings/lib/handleNewBooking.ts @@ -1485,6 +1485,9 @@ async function handler( newBookingData.recurringEventId = reqBody.recurringEventId; } if (originalRescheduledBooking) { + newBookingData.metadata = { + ...(typeof originalRescheduledBooking.metadata === "object" && originalRescheduledBooking.metadata), + }; newBookingData["paid"] = originalRescheduledBooking.paid; newBookingData["fromReschedule"] = originalRescheduledBooking.uid; if (newBookingData.attendees?.createMany?.data) {