Skip to content

Commit

Permalink
add demoURL and email fields
Browse files Browse the repository at this point in the history
  • Loading branch information
elvisduru committed May 6, 2024
1 parent aaa3e79 commit 640a546
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/mail/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,19 @@ 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;
const {
postId,
phone,
website,
country,
date,
utmCampaign,
utmSource,
utmTerm,
campaignName,
demoURL,
email,
} = formData;
// 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;

Expand All @@ -190,6 +202,8 @@ const createOrUpdatePostInLeadsChannel = async (formData: Record<string, any>) =
utmSource,
utmTerm,
campaignName,
demoURL,
email,
postId,
});
}
Expand All @@ -202,6 +216,8 @@ const createOrUpdatePostInLeadsChannel = async (formData: Record<string, any>) =
utmSource,
utmTerm,
campaignName,
demoURL,
email,
});
};

Expand Down

0 comments on commit 640a546

Please sign in to comment.