Scheduling infrastructure for absolutely everyone.
Hotfix: Event Name (#6863) (#6864)
Hariom Balhara90939090750a
diff --git a/apps/web/pages/booking/[uid].tsx b/apps/web/pages/booking/[uid].tsxindex c7463a7577f..8fee2fd5df1 100644--- a/apps/web/pages/booking/[uid].tsx+++ b/apps/web/pages/booking/[uid].tsx@@ -240,7 +240,7 @@ export default function Success(props: SuccessProps) {const giphyAppData = getEventTypeAppData(eventType, "giphy");const giphyImage = giphyAppData?.thankYouPage;- const eventName = getEventName(eventNameObject);+ const eventName = getEventName(eventNameObject, true);const needsConfirmation = eventType.requiresConfirmation && reschedule != true;const isCancelled = status === "CANCELLED" || status === "REJECTED";const telemetry = useTelemetry();diff --git a/packages/core/event.ts b/packages/core/event.tsindex 007c23fcd21..bb5cb2b3cad 100644--- a/packages/core/event.ts+++ b/packages/core/event.ts@@ -11,7 +11,7 @@ export type EventNameObjectType = {t: TFunction;};-export function getEventName(eventNameObj: EventNameObjectType) {+export function getEventName(eventNameObj: EventNameObjectType, forAttendeeView = false) {if (!eventNameObj.eventName)return eventNameObj.t("event_between_users", {eventName: eventNameObj.eventType,@@ -22,12 +22,13 @@ export function getEventName(eventNameObj: EventNameObjectType) {let eventName = eventNameObj.eventName;let locationString = eventNameObj.location || "";- if (eventNameObj.eventName.includes("{Location}")) {+ if (eventNameObj.eventName.includes("{Location}") || eventNameObj.eventName.includes("{LOCATION}")) {const eventLocationType = guessEventLocationType(eventNameObj.location);if (eventLocationType) {locationString = eventLocationType.label;}eventName = eventName.replace("{Location}", locationString);+ eventName = eventName.replace("{LOCATION}", locationString);}return (@@ -36,5 +37,9 @@ export function getEventName(eventNameObj: EventNameObjectType) {.replace("{Event type title}", eventNameObj.eventType).replace("{Scheduler}", eventNameObj.attendeeName).replace("{Organiser}", eventNameObj.host)+ .replace("{USER}", eventNameObj.attendeeName)+ .replace("{ATTENDEE}", eventNameObj.attendeeName)+ .replace("{HOST}", eventNameObj.host)+ .replace("{HOST/ATTENDEE}", forAttendeeView ? eventNameObj.host : eventNameObj.attendeeName));}