0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Fixed bulk email only having 'bulk-email' tag in certain circumstances

no issue

- the `'bulk-email`' tag was only being added to bulk emails if another more specific tag was set up via config
- we always want the `'bulk-email'` tag to be present for better event filtering
This commit is contained in:
Kevin Ansfield 2020-11-23 18:34:17 +00:00
parent 15650f9dad
commit 4c96aa5c95

View file

@ -84,9 +84,11 @@ function send(message, recipientData, replacements) {
messageData['v:email-id'] = message.id; messageData['v:email-id'] = message.id;
} }
const tags = ['bulk-email'];
if (bulkEmailConfig && bulkEmailConfig.mailgun && bulkEmailConfig.mailgun.tag) { if (bulkEmailConfig && bulkEmailConfig.mailgun && bulkEmailConfig.mailgun.tag) {
messageData['o:tag'] = [bulkEmailConfig.mailgun.tag, 'bulk-email']; tags.push(bulkEmailConfig.mailgun.tag);
} }
messageData['o:tag'] = tags;
if (bulkEmailConfig && bulkEmailConfig.mailgun && bulkEmailConfig.mailgun.testmode) { if (bulkEmailConfig && bulkEmailConfig.mailgun && bulkEmailConfig.mailgun.testmode) {
messageData['o:testmode'] = true; messageData['o:testmode'] = true;