@ -112,7 +112,7 @@ module.exports = function (Posts) {
return {
tid: tid,
cid: topicData.cid,
title: validator.escape(String(topicData.title)),
title: topicData.title,
isMainPost: false,
renamed: false,
tagsupdated: false,
@ -209,8 +209,7 @@ module.exports = function (Topics) {
};
async function onNewPost(postData, data) {
const { tid } = postData;
const { uid } = postData;
const { tid, uid } = postData;
await Topics.markCategoryUnreadForAll(tid);
await Topics.markAsRead([tid], uid);
const [