Scheduling infrastructure for absolutely everyone.
fix: username is visible in private booking link (#19054)
Benny Jooca650babaf94
diff --git a/packages/features/bookings/Booker/Booker.tsx b/packages/features/bookings/Booker/Booker.tsxindex 582a3669dea..816aa71fb5c 100644--- a/packages/features/bookings/Booker/Booker.tsx+++ b/packages/features/bookings/Booker/Booker.tsx@@ -78,6 +78,7 @@ const BookerComponent = ({hasValidLicense,isBookingDryRun: isBookingDryRunProp,renderCaptcha,+ hashedLink,}: BookerProps & WrappedBookerProps) => {const searchParams = useCompatSearchParams();const isPlatformBookerEmbed = useIsPlatformBookerEmbed();@@ -389,6 +390,7 @@ const BookerComponent = ({event={event.data}isPending={event.isPending}isPlatform={isPlatform}+ isPrivateLink={!!hashedLink}locale={userLocale}/>{layout !== BookerLayouts.MONTH_VIEW &&diff --git a/packages/features/bookings/Booker/components/EventMeta.tsx b/packages/features/bookings/Booker/components/EventMeta.tsxindex 4b3b97da55c..0c3c4f4f66b 100644--- a/packages/features/bookings/Booker/components/EventMeta.tsx+++ b/packages/features/bookings/Booker/components/EventMeta.tsx@@ -47,6 +47,7 @@ export const EventMeta = ({event,isPending,isPlatform = true,+ isPrivateLink,classNames,locale,}: {@@ -73,6 +74,7 @@ export const EventMeta = ({| "autoTranslateDescriptionEnabled"> | null;isPending: boolean;+ isPrivateLink: boolean;isPlatform?: boolean;classNames?: {eventMetaContainer?: string;@@ -153,6 +155,7 @@ export const EventMeta = ({users={event.subsetOfUsers}profile={event.profile}entity={event.entity}+ isPrivateLink={isPrivateLink}/><EventTitle className={`${classNames?.eventMetaTitle} my-2`}>{translatedTitle ?? event?.title}diff --git a/packages/features/bookings/components/event-meta/Members.tsx b/packages/features/bookings/components/event-meta/Members.tsxindex 1aecca0cb62..739da1939dc 100644--- a/packages/features/bookings/components/event-meta/Members.tsx+++ b/packages/features/bookings/components/event-meta/Members.tsx@@ -17,9 +17,16 @@ export interface EventMembersProps {users: BookerEvent["subsetOfUsers"];profile: BookerEvent["profile"];entity: BookerEvent["entity"];+ isPrivateLink: boolean;}-export const EventMembers = ({ schedulingType, users, profile, entity }: EventMembersProps) => {+export const EventMembers = ({+ schedulingType,+ users,+ profile,+ entity,+ isPrivateLink,+}: EventMembersProps) => {const username = useBookerStore((state) => state.username);const isDynamic = !!(username && username.indexOf("+") > -1);const isEmbed = useIsEmbed();@@ -40,7 +47,7 @@ export const EventMembers = ({ schedulingType, users, profile, entity }: EventMe{// We don't want booker to be able to see the list of other users or teams inside the embedhref:- isEmbed || isPlatform+ isEmbed || isPlatform || isPrivateLink? null: entity.teamSlug? getTeamUrlSync({ orgSlug: entity.orgSlug, teamSlug: entity.teamSlug })@@ -59,11 +66,12 @@ export const EventMembers = ({ schedulingType, users, profile, entity }: EventMeitems={[...orgOrTeamAvatarItem,...shownUsers.map((user) => ({- href: isPlatform- ? null- : `${getBookerBaseUrlSync(user.profile?.organization?.slug ?? null)}/${- user.profile?.username- }?redirect=false`,+ href:+ isPlatform || isPrivateLink+ ? null+ : `${getBookerBaseUrlSync(user.profile?.organization?.slug ?? null)}/${+ user.profile?.username+ }?redirect=false`,alt: user.name || "",title: user.name || "",image: getUserAvatarUrl(user),