2023-03-12 19:12:11 +03:00
|
|
|
module.exports = function (data) {
|
2023-03-28 22:06:05 +03:00
|
|
|
const {mentions} = data;
|
|
|
|
// Create a list of new mentions with a link to the source
|
|
|
|
const mentionsList = mentions.map((mention) => {
|
|
|
|
return `- ${mention.sourceSiteTitle} (${mention.sourceUrl})`;
|
|
|
|
}).join('\n');
|
|
|
|
|
2023-03-12 19:12:11 +03:00
|
|
|
// Be careful when you indent the email, because whitespaces are visible in emails!
|
|
|
|
return `
|
2023-03-28 22:06:05 +03:00
|
|
|
You have been mentioned recently. Here's where:
|
|
|
|
|
|
|
|
${mentionsList}
|
2023-03-12 19:12:11 +03:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
Sent to ${data.toEmail} from ${data.siteDomain}.
|
|
|
|
If you would no longer like to receive these notifications you can adjust your settings at ${data.staffUrl}.
|
|
|
|
`;
|
|
|
|
};
|