diff --git a/packages/features/eventtypes/lib/getPublicEvent.ts b/packages/features/eventtypes/lib/getPublicEvent.ts index 2d106e599a..d587b1f361 100644 --- a/packages/features/eventtypes/lib/getPublicEvent.ts +++ b/packages/features/eventtypes/lib/getPublicEvent.ts @@ -345,16 +345,26 @@ export const getPublicEvent = async ( bookingFields: getBookingFieldsWithSystemFields({ ...defaultEvent, disableBookingTitle }), restrictionScheduleId: null, useBookerTimezone: false, - // Clears meta data since we don't want to send this in the public api. + // Only return fields consumed by the booker. subsetOfUsers: users.map((user) => ({ - ...user, - metadata: undefined, + name: user.name, + username: user.username, + avatarUrl: user.avatarUrl, + weekStart: user.weekStart, + brandColor: user.brandColor, + darkBrandColor: user.darkBrandColor, + profile: user.profile, bookerUrl: getBookerBaseUrlSync(user.profile?.organization?.slug ?? null), })), users: fetchAllUsers ? users.map((user) => ({ - ...user, - metadata: undefined, + name: user.name, + username: user.username, + avatarUrl: user.avatarUrl, + weekStart: user.weekStart, + brandColor: user.brandColor, + darkBrandColor: user.darkBrandColor, + profile: user.profile, bookerUrl: getBookerBaseUrlSync(user.profile?.organization?.slug ?? null), })) : undefined,