fix: use postData.topic.title instead of topicData.title

This commit is contained in:
Barış Soner Uşaklı
2024-10-24 19:25:24 -04:00
parent adfd08ad37
commit d24bc5c52e

View File

@@ -206,15 +206,10 @@ UserNotifications.sendTopicNotificationToFollowers = async function (uid, topicD
if (!followers.length) {
return;
}
let { title } = topicData;
if (title) {
title = utils.decodeHTMLEntities(title);
title = title.replace(/,/g, '\\,');
}
const notifObj = await notifications.create({
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,
pid: postData.pid,
path: `/post/${postData.pid}`,