0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Updated mega service to use open tracking from settings

refs https://github.com/TryGhost/Ghost/issues/12390

- switched from enabling open tracking based on `enableDeveloperExperiments` to using the track-opens setting
This commit is contained in:
Kevin Ansfield 2020-11-23 18:53:55 +00:00
parent ea77f3f349
commit a8d8598003

View file

@ -71,7 +71,7 @@ const sendTestEmail = async (postModel, toEmails) => {
})); }));
// enable tracking for previews to match real-world behaviour // enable tracking for previews to match real-world behaviour
emailData.track_opens = config.get('enableDeveloperExperiments'); emailData.track_opens = settingsCache.get('email_track_opens');
const response = await bulkEmailService.send(emailData, recipients); const response = await bulkEmailService.send(emailData, recipients);
@ -140,7 +140,7 @@ const addEmail = async (postModel, options) => {
html: emailData.html, html: emailData.html,
plaintext: emailData.plaintext, plaintext: emailData.plaintext,
submitted_at: moment().toDate(), submitted_at: moment().toDate(),
track_opens: config.get('enableDeveloperExperiments'), track_opens: settingsCache.get('email_track_opens'),
recipient_filter: emailRecipientFilter recipient_filter: emailRecipientFilter
}, knexOptions); }, knexOptions);
} else { } else {