From 7218a9d8cb9665938e5be9f4c8ddd843993f12d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 12 Apr 2024 11:44:00 -0400 Subject: [PATCH] add tid/uid to teaser --- src/categories/recentreplies.js | 5 +++-- src/controllers/helpers.js | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/categories/recentreplies.js b/src/categories/recentreplies.js index 7b04974659..cb7056bfbb 100644 --- a/src/categories/recentreplies.js +++ b/src/categories/recentreplies.js @@ -116,9 +116,10 @@ module.exports = function (Categories) { if (teaser) { teaser.cid = topicData[index].cid; teaser.parentCids = cidToRoot[teaser.cid]; - teaser.tid = undefined; - teaser.uid = undefined; + teaser.tid = topicData[index].tid; + teaser.uid = topicData[index].uid; teaser.topic = { + tid: topicData[index].tid, slug: topicData[index].slug, title: topicData[index].title, }; diff --git a/src/controllers/helpers.js b/src/controllers/helpers.js index a4a2287160..c17e701b79 100644 --- a/src/controllers/helpers.js +++ b/src/controllers/helpers.js @@ -396,6 +396,7 @@ helpers.setCategoryTeaser = function (category) { url: `${nconf.get('relative_path')}/post/${post.pid}`, timestampISO: post.timestampISO, pid: post.pid, + tid: post.tid, index: post.index, topic: post.topic, user: post.user,