updated with support for link wrapping in URL camp
This commit is contained in:
parent
3a2d1512ab
commit
3124df6989
2 changed files with 6 additions and 4 deletions
|
@ -214,7 +214,7 @@ class MessageSender {
|
|||
|
||||
html = response.body;
|
||||
text = '';
|
||||
renderTags = false;
|
||||
renderTags = true;
|
||||
}
|
||||
|
||||
const attachments = this.attachments.slice();
|
||||
|
@ -236,8 +236,10 @@ class MessageSender {
|
|||
html = await links.updateLinks(html, this.tagLanguage, mergeTags, campaign, list, subscriptionGrouped);
|
||||
}
|
||||
|
||||
// When no list and subscriptionGrouped is provided, formatCampaignTemplate works the same way as formatTemplate
|
||||
html = tools.formatCampaignTemplate(html, this.tagLanguage, mergeTags, true, campaign, list, subscriptionGrouped);
|
||||
if (campaign.source !== CampaignSource.URL) {
|
||||
// When no list and subscriptionGrouped is provided, formatCampaignTemplate works the same way as formatTemplate
|
||||
html = tools.formatCampaignTemplate(html, this.tagLanguage, mergeTags, true, campaign, list, subscriptionGrouped);
|
||||
}
|
||||
}
|
||||
|
||||
const generateText = !!(text || '').trim();
|
||||
|
|
|
@ -140,7 +140,7 @@ async function addOrGet(campaignId, url) {
|
|||
}
|
||||
}
|
||||
|
||||
async function updateLinks(source, tagLanguage, mergeTags, campaign, list, subscription) {
|
||||
async function updateLinks(source, tagLanguage='simple', mergeTags, campaign, list, subscription) {
|
||||
if ((campaign.open_tracking_disabled && campaign.click_tracking_disabled) || !source || !source.trim()) {
|
||||
// tracking is disabled, do not modify the message
|
||||
return source;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue