Files
calendar/packages/sms/attendee/event-rescheduled-sms.ts
Udit TakkarandGitHub 0b59a5d184 fix: encoding bug (#21004)
* fix: encoding bug

* fix: use escapeValue
2025-04-28 14:56:12 +00:00

33 lines
1.0 KiB
TypeScript

import { WEBAPP_URL } from "@calcom/lib/constants";
import type { CalendarEvent, Person } from "@calcom/types/Calendar";
import SMSManager from "../sms-manager";
export default class EventSuccessfullyReScheduledSMS extends SMSManager {
constructor(calEvent: CalendarEvent) {
super(calEvent);
}
getMessage(attendee: Person) {
const t = attendee.language.translate;
const bookerUrl = `${this.calEvent.bookerUrl ?? WEBAPP_URL}/booking/${this.calEvent.uid}`;
const bookerUrlText = t("you_can_view_booking_details_with_this_url", {
url: bookerUrl,
interpolation: { escapeValue: false },
});
const eventTypeHasBeenRescheduledOnTimeDateText = t("event_type_has_been_rescheduled_on_time_date", {
title: this.calEvent.title,
date: this.getFormattedDate(attendee.timeZone, attendee.language.locale),
interpolation: { escapeValue: false },
});
const messageText = `${t("hey_there")} ${
attendee.name
}, ${eventTypeHasBeenRescheduledOnTimeDateText} \n\n${bookerUrlText}`;
return messageText;
}
}