From ea62bb4c7ac6fb09e942061c3c065d481aba2643 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 2 Oct 2024 17:28:38 -0500 Subject: [PATCH] Website: Update contact form validation and slack message (#22587) Closes: #22522 Changes: - Updated the contact form to not have a personal email address filter. - Updated the message posted in Slack when users submit contact form messages. --- .../api/controllers/deliver-contact-form-message.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/website/api/controllers/deliver-contact-form-message.js b/website/api/controllers/deliver-contact-form-message.js index 37e5693f5c..3a5116528f 100644 --- a/website/api/controllers/deliver-contact-form-message.js +++ b/website/api/controllers/deliver-contact-form-message.js @@ -41,10 +41,6 @@ module.exports = { exits: { - invalidEmailDomain: { - description: 'This email address is on a denylist of domains and was not delivered.', - responseType: 'badRequest' - }, success: { description: 'The message was sent successfully.' } @@ -61,13 +57,8 @@ module.exports = { ); } - let emailDomain = emailAddress.split('@')[1]; - if(_.includes(sails.config.custom.bannedEmailDomainsForWebsiteSubmissions, emailDomain.toLowerCase())){ - throw 'invalidEmailDomain'; - } - await sails.helpers.http.post(sails.config.custom.slackWebhookUrlForContactForm, { - text: `New contact form message: (Remember: we have to email back; can't just reply to this thread.)`+ + text: `New contact form message: (cc: <@U05CS07KASK>) (Remember: we have to email back; can't just reply to this thread.)`+ `Name: ${firstName + ' ' + lastName}, Email: ${emailAddress}, Message: ${message ? message : 'No message.'}` });