fix: add extra security layers for sending messages to attendees (#10636)

Co-authored-by: CarinaWolli <[email protected]>
This commit is contained in:
Carina WollendorferandCarinaWolli authored and GitHub committed 2023-08-10 11:52:36 -07:00
1 parent 633d85e81b
commit c7dfa7bc89
33 files changed
+690 -101

No files matched your search

@@ -134,12 +134,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
);
}
if (
message?.length &&
message?.length > 0 &&
sendTo &&
reminder.workflowStep.action !== WorkflowActions.SMS_ATTENDEE
) {
if (message?.length && message?.length > 0 && sendTo) {
const scheduledSMS = await twilio.scheduleSMS(sendTo, message, reminder.scheduledDate, senderID);
await prisma.workflowReminder.update({
@@ -90,12 +90,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
userName
);
if (
message?.length &&
message?.length > 0 &&
sendTo &&
reminder.workflowStep.action !== WorkflowActions.WHATSAPP_ATTENDEE
) {
if (message?.length && message?.length > 0 && sendTo) {
const scheduledSMS = await twilio.scheduleSMS(sendTo, message, reminder.scheduledDate, "", true);
await prisma.workflowReminder.update({