Skip to content

Node.js based forum software built for the modern web

fix: backport bodylong tx to master

Barış Soner Uşaklı7a5f50f90504
diff --git a/src/socket.io/admin/email.js b/src/socket.io/admin/email.js
index 9059520b2b..f355b8ca4b 100644
--- a/src/socket.io/admin/email.js
+++ b/src/socket.io/admin/email.js
@@ -10,6 +10,7 @@ const notifications = require('../../notifications');
const emailer = require('../../emailer');
const utils = require('../../utils');
const user = require('../../user');
+const tx = require('../../translator');
const Email = module.exports;
@@ -58,7 +59,7 @@ Email.test = async function (socket, data) {
path: notification.path,
subject: utils.stripHTMLTags(notification.subject || '[[notifications:new-notification]]'),
intro: utils.stripHTMLTags(notification.bodyShort),
- body: notification.bodyLong || '',
+ body: await tx.translate(notification.bodyLong || ''),
notification,
showUnsubscribe: true,
});