Node.js based forum software built for the modern web
fix: #12415, fix notification escaping for queued posts
Barış Soner Uşaklı4787d013cf4a
diff --git a/src/socket.io/posts.js b/src/socket.io/posts.jsindex 9eef769cb3..a684d95783 100644--- a/src/socket.io/posts.js+++ b/src/socket.io/posts.js@@ -11,6 +11,7 @@ const topics = require('../topics');const notifications = require('../notifications');const utils = require('../utils');const events = require('../events');+const translator = require('../translator');const api = require('../api');const sockets = require('.');@@ -159,10 +160,13 @@ async function canEditQueue(socket, data, action) {}async function sendQueueNotification(type, targetUid, path, notificationText) {+ const bodyShort = notificationText ?+ translator.compile(`notifications:${type}`, notificationText) :+ translator.compile(`notifications:${type}`);const notifData = {type: type,nid: `${type}-${targetUid}-${path}`,- bodyShort: notificationText ? `[[notifications:${type}, ${notificationText}]]` : `[[notifications:${type}]]`,+ bodyShort: bodyShort,path: path,};if (parseInt(meta.config.postQueueNotificationUid, 10) > 0) {