@@ -14,12 +14,14 @@ export default class AwaitingPaymentSMS extends SMSManager {
|
||||
const messageText = `${t("meeting_awaiting_payment")}: ${t("complete_your_booking_subject", {
|
||||
title: this.calEvent.title,
|
||||
date: this.getFormattedDate(attendee.timeZone, attendee.language.locale),
|
||||
interpolation: { escapeValue: false },
|
||||
})}`;
|
||||
|
||||
const bookingUrl = `${this.calEvent.bookerUrl ?? WEBAPP_URL}/booking/${this.calEvent.uid}?changes=true`;
|
||||
|
||||
const urlText = t("you_can_view_booking_details_with_this_url", {
|
||||
url: bookingUrl,
|
||||
interpolation: { escapeValue: false },
|
||||
});
|
||||
|
||||
return `${messageText}\n\n${urlText}`;
|
||||
|
||||
@@ -15,6 +15,7 @@ export default class CancelledSeatSMS extends SMSManager {
|
||||
})}\n\n${t("event_no_longer_attending_subject", {
|
||||
name: this.calEvent.team?.name || this.calEvent.organizer.name,
|
||||
date: this.getFormattedDate(attendee.timeZone, attendee.language.locale),
|
||||
interpolation: { escapeValue: false },
|
||||
})} `;
|
||||
|
||||
return `${messageText}`;
|
||||
|
||||
@@ -17,11 +17,13 @@ export default class EventCancelledSMS extends SMSManager {
|
||||
{
|
||||
title: this.calEvent.title,
|
||||
date: this.getFormattedDate(attendee.timeZone, attendee.language.locale),
|
||||
interpolation: { escapeValue: false },
|
||||
}
|
||||
)}`;
|
||||
|
||||
const urlText = t("you_can_view_booking_details_with_this_url", {
|
||||
url: bookingUrl,
|
||||
interpolation: { escapeValue: false },
|
||||
});
|
||||
|
||||
return `${messageText}\n\n${urlText}`;
|
||||
|
||||
@@ -13,6 +13,7 @@ export default class EventDeclinedSMS extends SMSManager {
|
||||
const eventDeclinedText = t("event_declined_subject", {
|
||||
title: this.calEvent.title,
|
||||
date: this.getFormattedDate(attendee.timeZone, attendee.language.locale),
|
||||
interpolation: { escapeValue: false },
|
||||
});
|
||||
|
||||
const messageText = `${t("hey_there")} ${attendee.name}, ${t(
|
||||
|
||||
@@ -17,6 +17,7 @@ export default class EventLocationChangedSMS extends SMSManager {
|
||||
|
||||
const urlText = t("you_can_view_booking_details_with_this_url", {
|
||||
url: bookingUrl,
|
||||
interpolation: { escapeValue: false },
|
||||
});
|
||||
|
||||
return `${messageText}\n\n${urlText}`;
|
||||
|
||||
@@ -13,15 +13,18 @@ export default class EventRequestSMS extends SMSManager {
|
||||
|
||||
const bookingSubmittedText = t("booking_submitted", {
|
||||
name: attendee.name,
|
||||
interpolation: { escapeValue: false },
|
||||
});
|
||||
|
||||
const bookingUrl = `${this.calEvent.bookerUrl ?? WEBAPP_URL}/booking/${this.calEvent.uid}`;
|
||||
const urlText = t("you_can_view_booking_details_with_this_url", {
|
||||
url: bookingUrl,
|
||||
interpolation: { escapeValue: false },
|
||||
});
|
||||
|
||||
const userNeedsToConfirmOrRejectBookingText = t("user_needs_to_confirm_or_reject_booking", {
|
||||
user: this.calEvent.organizer.name,
|
||||
interpolation: { escapeValue: false },
|
||||
});
|
||||
|
||||
const messageText = `${bookingSubmittedText}. ${userNeedsToConfirmOrRejectBookingText}\n\n${urlText}`;
|
||||
|
||||
@@ -14,6 +14,7 @@ export default class EventRequestToRescheduleSMS extends SMSManager {
|
||||
|
||||
const requestRescheduleSubtitle = t("request_reschedule_subtitle", {
|
||||
organizer: this.calEvent.organizer.name,
|
||||
interpolation: { escapeValue: false },
|
||||
});
|
||||
|
||||
const needToRescheduleOrCancelText = t("need_to_reschedule_or_cancel");
|
||||
|
||||
@@ -14,11 +14,13 @@ export default class EventSuccessfullyReScheduledSMS extends SMSManager {
|
||||
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")} ${
|
||||
|
||||
@@ -14,12 +14,14 @@ export default class EventSuccessfullyScheduledSMS extends SMSManager {
|
||||
const confirmationText = t("confirming_your_booking_sms", {
|
||||
name: attendee.name,
|
||||
date: this.getFormattedDate(attendee.timeZone, attendee.language.locale),
|
||||
interpolation: { escapeValue: false },
|
||||
});
|
||||
|
||||
const bookingUrl = `${this.calEvent.bookerUrl ?? WEBAPP_URL}/booking/${this.calEvent.uid}`;
|
||||
|
||||
const urlText = t("you_can_view_booking_details_with_this_url", {
|
||||
url: bookingUrl,
|
||||
interpolation: { escapeValue: false },
|
||||
});
|
||||
|
||||
return `${confirmationText}\n\n${urlText}`;
|
||||
|
||||
@@ -37,8 +37,7 @@ const handleSendingSMS = ({
|
||||
if (!team?.parent?.isOrganization) return;
|
||||
|
||||
await checkSMSRateLimit({ identifier: `handleSendingSMS:team:${teamId}`, rateLimitingType: "sms" });
|
||||
const sanitizedMessage = smsMessage.replace(///g, "/");
|
||||
const sms = twilio.sendSMS(reminderPhone, sanitizedMessage, senderID, teamId);
|
||||
const sms = twilio.sendSMS(reminderPhone, smsMessage, senderID, teamId);
|
||||
resolve(sms);
|
||||
} catch (e) {
|
||||
reject(console.error(`twilio.sendSMS failed`, e));
|
||||
|
||||
Reference in New Issue
Block a user