File tree Expand file tree Collapse file tree
apps/web/lib/reschedule/[uid] Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { URLSearchParams } from "url";
44import { z } from "zod" ;
55
66import { getServerSession } from "@calcom/features/auth/lib/getServerSession" ;
7+ import { getFullName } from "@calcom/features/form-builder/utils" ;
78import { buildEventUrlFromBooking } from "@calcom/lib/bookings/buildEventUrlFromBooking" ;
89import { getDefaultEvent } from "@calcom/lib/defaultEvents" ;
910import { getSafe } from "@calcom/lib/getSafe" ;
@@ -139,7 +140,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
139140 if ( isBookingInPast && ! eventType . allowReschedulingPastBookings ) {
140141 const destinationUrlSearchParams = new URLSearchParams ( ) ;
141142 const responses = bookingSeat ? getSafe < string > ( bookingSeat . data , [ "responses" ] ) : booking . responses ;
142- const name = getSafe < string > ( responses , [ "name" ] ) ;
143+ const name = getFullName ( getSafe < string | { firstName : string ; lastName ?: string } > ( responses , [ "name" ] ) ) ;
143144 const email = getSafe < string > ( responses , [ "email" ] ) ;
144145
145146 if ( name ) destinationUrlSearchParams . set ( "name" , name ) ;
You can’t perform that action at this time.
0 commit comments