Work in progress on tag language

Fix - message sent to a list not associated with a campaign couldn't be shown in archive - to know which message to show even if the list is not at the campaign, we store test messages in table test_messages
This commit is contained in:
Tomas Bures 2019-07-05 23:23:02 +02:00
parent 00e328a914
commit 4113cb8476
17 changed files with 312 additions and 172 deletions

View file

@ -6,7 +6,7 @@ const settings = require('../models/settings');
const {getTrustedUrl, getPublicUrl} = require('./urls');
const { tUI, tMark } = require('./translate');
const contextHelpers = require('./context-helpers');
const {getFieldColumn} = require('../../shared/lists');
const {getFieldColumn, toNameTagLangauge} = require('../../shared/lists');
const forms = require('../models/forms');
const messageSender = require('./message-sender');
const tools = require('./tools');
@ -118,7 +118,7 @@ async function _sendMail(list, email, template, locale, subjectKey, relativeUrls
await messageSender.queueSubscriptionMessage(
list.send_configuration,
{
name: list.to_name === null ? undefined : tools.formatTemplate(list.to_name, {}, mergeTags, false),
name: list.to_name === null ? undefined : tools.formatTemplate(list.to_name, toNameTagLangauge, mergeTags, false),
address: email
},
tUI(subjectKey, locale, { list: list.name }),