All emails use unsubscribeUrl

This commit is contained in:
Ian Philips 2022-09-12 10:30:16 -06:00
parent f3324ae7b7
commit f6bf2089e2
13 changed files with 22 additions and 20 deletions

View File

@ -96,6 +96,7 @@ export const createNotification = async (
if (!sendToEmail) continue
if (reason === 'your_contract_closed' && privateUser && sourceContract) {
// TODO: include number and names of bettors waiting for creator to resolve their market
await sendMarketCloseEmail(
reason,
sourceUser,
@ -287,6 +288,7 @@ export const createCommentOrAnswerOrUpdatedContractNotification = async (
}
if (sendToEmail) {
if (sourceType === 'comment') {
// TODO: change subject of email title to be more specific, i.e.: replied to you on/tagged you on/comment
await sendNewCommentEmail(
reason,
privateUser,

View File

@ -285,7 +285,7 @@
<div
style="font-family:Arial, sans-serif;font-size:11px;letter-spacing:normal;line-height:22px;text-align:center;color:#000000;">
<p style="margin: 10px 0;">This e-mail has been sent to {{name}},
<a href="{{unsubscribeLink}}" style="
<a href="{{unsubscribeUrl}}" style="
color: inherit;
text-decoration: none;
" target="_blank">click here to manage your notifications</a>.

View File

@ -490,7 +490,7 @@
">
<p style="margin: 10px 0">
This e-mail has been sent to {{name}},
<a href="{{unsubscribeLink}}" style="
<a href="{{unsubscribeUrl}}" style="
color: inherit;
text-decoration: none;
" target="_blank">click here to manage your notifications</a>.

View File

@ -440,7 +440,7 @@
<p style="margin: 10px 0">
This e-mail has been sent to
{{name}},
<a href="{{unsubscribeLink}}" style="
<a href="{{unsubscribeUrl}}" style="
color: inherit;
text-decoration: none;
" target="_blank">click here to manage your notifications</a>.

View File

@ -526,7 +526,7 @@
"
>our Discord</a
>! Or,
<a href="{{unsubscribeLink}}" style="
<a href="{{unsubscribeUrl}}" style="
color: inherit;
text-decoration: none;
" target="_blank">click here to manage your notifications</a>.

View File

@ -366,7 +366,7 @@
text-decoration: underline;
margin: 0;
">our Discord</a>! Or,
<a href="{{unsubscribeLink}}" style="
<a href="{{unsubscribeUrl}}" style="
color: inherit;
text-decoration: none;
" target="_blank">click here to manage your notifications</a>.

View File

@ -484,7 +484,7 @@
text-decoration: underline;
margin: 0;
">our Discord</a>! Or,
<a href="{{unsubscribeLink}}" style="
<a href="{{unsubscribeUrl}}" style="
color: inherit;
text-decoration: none;
" target="_blank">click here to manage your notifications</a>.

View File

@ -366,7 +366,7 @@
text-decoration: underline;
margin: 0;
">our Discord</a>! Or,
<a href="{{unsubscribeLink}}" style="
<a href="{{unsubscribeUrl}}" style="
color: inherit;
text-decoration: none;
" target="_blank">click here to manage your notifications</a>.

View File

@ -499,7 +499,7 @@
text-decoration: underline;
margin: 0;
">our Discord</a>! Or,
<a href="{{unsubscribeLink}}" style="
<a href="{{unsubscribeUrl}}" style="
color: inherit;
text-decoration: none;
" target="_blank">click here to manage your notifications</a>.

View File

@ -280,7 +280,7 @@
">
<p style="margin: 10px 0">
This e-mail has been sent to {{name}},
<a href="{{unsubscribeLink}}" style="
<a href="{{unsubscribeUrl}}" style="
color: inherit;
text-decoration: none;
" target="_blank">click here to manage your notifications</a>.

View File

@ -215,7 +215,7 @@
style="font-family:Arial, sans-serif;font-size:11px;letter-spacing:normal;line-height:22px;text-align:center;color:#000000;">
<p style="margin: 10px 0;">This e-mail has been sent
to {{name}},
<a href="{{unsubscribeLink}}" style="
<a href="{{unsubscribeUrl}}" style="
color: inherit;
text-decoration: none;
" target="_blank">click here to manage your notifications</a>.

View File

@ -287,7 +287,7 @@
<div
style="font-family:Arial, sans-serif;font-size:11px;letter-spacing:normal;line-height:22px;text-align:center;color:#000000;">
<p style="margin: 10px 0;">This e-mail has been sent to {{name}},
<a href="{{unsubscribeLink}}" style="
<a href="{{unsubscribeUrl}}" style="
color: inherit;
text-decoration: none;
" target="_blank">click here to manage your notifications</a>.

View File

@ -153,7 +153,7 @@ export const sendWelcomeEmail = async (
const { name } = user
const firstName = name.split(' ')[0]
const unsubscribeLink = `${DOMAIN}/notifications?tab=settings&section=${
const unsubscribeUrl = `${DOMAIN}/notifications?tab=settings&section=${
'onboarding_flow' as keyof notification_subscription_types
}`
@ -163,7 +163,7 @@ export const sendWelcomeEmail = async (
'welcome',
{
name: firstName,
unsubscribeLink,
unsubscribeUrl,
},
{
from: 'David from Manifold <david@manifold.markets>',
@ -221,7 +221,7 @@ export const sendOneWeekBonusEmail = async (
const { name } = user
const firstName = name.split(' ')[0]
const unsubscribeLink = `${DOMAIN}/notifications?tab=settings&section=${
const unsubscribeUrl = `${DOMAIN}/notifications?tab=settings&section=${
'onboarding_flow' as keyof notification_subscription_types
}`
return await sendTemplateEmail(
@ -230,7 +230,7 @@ export const sendOneWeekBonusEmail = async (
'one-week',
{
name: firstName,
unsubscribeLink,
unsubscribeUrl,
manalink: 'https://manifold.markets/link/lj4JbBvE',
},
{
@ -254,7 +254,7 @@ export const sendCreatorGuideEmail = async (
const { name } = user
const firstName = name.split(' ')[0]
const unsubscribeLink = `${DOMAIN}/notifications?tab=settings&section=${
const unsubscribeUrl = `${DOMAIN}/notifications?tab=settings&section=${
'onboarding_flow' as keyof notification_subscription_types
}`
return await sendTemplateEmail(
@ -263,7 +263,7 @@ export const sendCreatorGuideEmail = async (
'creating-market',
{
name: firstName,
unsubscribeLink,
unsubscribeUrl,
},
{
from: 'David from Manifold <david@manifold.markets>',
@ -288,7 +288,7 @@ export const sendThankYouEmail = async (
const { name } = user
const firstName = name.split(' ')[0]
const unsubscribeLink = `${DOMAIN}/notifications?tab=settings&section=${
const unsubscribeUrl = `${DOMAIN}/notifications?tab=settings&section=${
'thank_you_for_purchases' as keyof notification_subscription_types
}`
@ -298,7 +298,7 @@ export const sendThankYouEmail = async (
'thank-you',
{
name: firstName,
unsubscribeLink,
unsubscribeUrl,
},
{
from: 'David from Manifold <david@manifold.markets>',
@ -479,7 +479,7 @@ export const sendInterestingMarketsEmail = async (
'interesting-markets',
{
name: firstName,
unsubscribeLink: unsubscribeUrl,
unsubscribeUrl,
question1Title: contractsToSend[0].question,
question1Link: contractUrl(contractsToSend[0]),