mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 17:46:16 +01:00
fix: use postData.topic.title instead of topicData.title
This commit is contained in:
@@ -206,15 +206,10 @@ UserNotifications.sendTopicNotificationToFollowers = async function (uid, topicD
|
|||||||
if (!followers.length) {
|
if (!followers.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let { title } = topicData;
|
|
||||||
if (title) {
|
|
||||||
title = utils.decodeHTMLEntities(title);
|
|
||||||
title = title.replace(/,/g, '\\,');
|
|
||||||
}
|
|
||||||
|
|
||||||
const notifObj = await notifications.create({
|
const notifObj = await notifications.create({
|
||||||
type: 'new-topic',
|
type: 'new-topic',
|
||||||
bodyShort: translator.compile('notifications:user-posted-topic', postData.user.displayname, title),
|
bodyShort: translator.compile('notifications:user-posted-topic', postData.user.displayname, postData.topic.title),
|
||||||
bodyLong: postData.content,
|
bodyLong: postData.content,
|
||||||
pid: postData.pid,
|
pid: postData.pid,
|
||||||
path: `/post/${postData.pid}`,
|
path: `/post/${postData.pid}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user