Skip to content

Commit

Permalink
prevent test phone leads
Browse files Browse the repository at this point in the history
  • Loading branch information
elvisduru committed Apr 19, 2024
1 parent 16a0bf6 commit b30ec13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mail/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ const updateMessageInLeadsChannel = async (form: Record<string, any>) => {

const createOrUpdatePostInLeadsChannel = async (formData: Record<string, any>) => {
const { postId, phone, website, country, date, utmCampaign, utmSource, utmTerm, campaignName } = formData;
if (!phone) return;
// If there's no phone number, or the phone number includes the test phone number, don't send the message
if (!phone || ["495678", "495679"].includes(phone)) return;

if (postId) {
return await updateMessageInLeadsChannel({
Expand Down

0 comments on commit b30ec13

Please sign in to comment.