mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 01:18:42 +00:00
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.
This commit is contained in:
parent
d8b67807ba
commit
ea62bb4c7a
1 changed files with 1 additions and 10 deletions
|
|
@ -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.'}`
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue