diff --git a/public/language/en-GB/notifications.json b/public/language/en-GB/notifications.json
index 4daeda5934..73832464dc 100644
--- a/public/language/en-GB/notifications.json
+++ b/public/language/en-GB/notifications.json
@@ -72,6 +72,7 @@
"new-register-multiple": "There are %1 registration requests awaiting review.",
"flag-assigned-to-you": "Flag %1 has been assigned to you",
"post-awaiting-review": "Post awaiting review",
+ "topic-awaiting-review": "Topic awaiting review",
"profile-exported": "%1 profile exported, click to download",
"posts-exported": "%1 posts exported, click to download",
"uploads-exported": "%1 uploads exported, click to download",
diff --git a/src/notifications.js b/src/notifications.js
index c22d050a87..e52be01609 100644
--- a/src/notifications.js
+++ b/src/notifications.js
@@ -329,7 +329,7 @@ async function sendEmail({ uids, notification }, cacheKey, reason) {
if (['new-reply', 'new-chat'].includes(notification.type)) {
notification['cta-type'] = notification.type;
}
- let body = notification.bodyLong || '';
+ let body = notification.bodyEmail || notification.bodyLong || '';
if (meta.config.removeEmailNotificationImages) {
body = body.replace(/
]*>/, '');
}
diff --git a/src/posts/queue.js b/src/posts/queue.js
index 6aca0d781c..4138ed29ef 100644
--- a/src/posts/queue.js
+++ b/src/posts/queue.js
@@ -201,14 +201,19 @@ module.exports = function (Posts) {
await plugins.hooks.fire('action:post-queue.save', payload);
const cid = await getCid(type, data);
const uids = await getNotificationUids(cid);
- const bodyLong = await parseBodyLong(cid, type, data);
+ const bodyEmail = await parseBodyEmail(cid, type, data);
const notifObj = await notifications.create({
type: 'post-queue',
nid: `post-queue-${id}`,
- mergeId: 'post-queue',
- bodyShort: '[[notifications:post-awaiting-review]]',
- bodyLong: bodyLong,
+ mergeId: `post-queue-${type}-uid-${data.uid}`,
+ bodyShort: type === 'reply' ?
+ '[[notifications:post-awaiting-review]]' :
+ '[[notifications:topic-awaiting-review]]',
+ bodyLong: type === 'reply' ?
+ await plugins.hooks.fire('filter:parse.raw', data.content) :
+ validator.escape(String(data.title)),
+ bodyEmail: bodyEmail,
path: `/post-queue/${id}`,
from: data.uid,
});
@@ -221,7 +226,7 @@ module.exports = function (Posts) {
};
};
- async function parseBodyLong(cid, type, data) {
+ async function parseBodyEmail(cid, type, data) {
const url = nconf.get('url');
const [content, category, userData] = await Promise.all([
plugins.hooks.fire('filter:parse.raw', data.content),