fix START_TIME variable + allow sms for self hosted (#8762)

Co-authored-by: CarinaWolli <[email protected]>
This commit is contained in:
Carina WollendorferandCarinaWolli authored and GitHub committed 2023-05-09 07:50:17 +00:00
1 parent af7d7ec678
commit fbbcc401cb
3 files changed
+11 -5

No files matched your search

@@ -49,6 +49,7 @@ const customTemplate = (
.replaceAll("{ATTENDEE_NAME}", variables.attendeeName || "") //old variable names
.replaceAll("{EVENT_DATE}", translatedDate)
.replaceAll("{EVENT_TIME}", variables.eventDate?.format("H:mmA") || "")
.replaceAll("{START_TIME}", variables.eventDate?.format("H:mmA") || "")
.replaceAll("{EVENT_END_TIME}", variables.eventEndTime?.format("H:mmA") || "")
.replaceAll("{LOCATION}", locationString)
.replaceAll("{ADDITIONAL_NOTES}", variables.additionalNotes || "")
@@ -64,7 +65,11 @@ const customTemplate = (
// event date/time with formatting
customInputvariables?.forEach((variable) => {
if (variable.startsWith("EVENT_DATE_") || variable.startsWith("EVENT_TIME_")) {
if (
variable.startsWith("EVENT_DATE_") ||
variable.startsWith("EVENT_TIME_") ||
variable.startsWith("START_TIME_")
) {
const dateFormat = variable.substring(11, text.length);
const formattedDate = variables.eventDate?.format(dateFormat);
dynamicText = dynamicText.replace(`{${variable}}`, formattedDate || "");
@@ -14,7 +14,7 @@ const smsReminderTemplate = (
if (isEditingMode) {
eventName = "{EVENT_NAME}";
timeZone = "{TIMEZONE}";
startTime = "{START_TIME_h:mmA}";
startTime = "{EVENT_TIME_h:mmA}";
eventDate = "{EVENT_DATE_YYYY MMM D}";
attendee = action === WorkflowActions.SMS_ATTENDEE ? "{ORGANIZER}" : "{ATTENDEE}";