mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #12415, fix notification escaping for queued posts
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user