mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
@@ -181,6 +181,7 @@ module.exports = function (utils, Benchpress, relative_path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderTopicEvents(index, sort) {
|
function renderTopicEvents(index, sort) {
|
||||||
|
console.warn('[renderTopicEvents] deprecated, use a partial at partials/topic/event.tpl');
|
||||||
if (sort === 'most_votes') {
|
if (sort === 'most_votes') {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,6 +185,12 @@ Topics.getTopicWithPosts = async function (topicData, set, uid, start, stop, rev
|
|||||||
topicData.thumbs = thumbs[0];
|
topicData.thumbs = thumbs[0];
|
||||||
topicData.posts = posts;
|
topicData.posts = posts;
|
||||||
topicData.events = events;
|
topicData.events = events;
|
||||||
|
topicData.posts.forEach((p) => {
|
||||||
|
p.events = events.filter(
|
||||||
|
event => event.timestamp >= p.eventStart && event.timestamp < p.eventEnd
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
topicData.category = category;
|
topicData.category = category;
|
||||||
topicData.tagWhitelist = tagWhitelist[0];
|
topicData.tagWhitelist = tagWhitelist[0];
|
||||||
topicData.minTags = category.minTags;
|
topicData.minTags = category.minTags;
|
||||||
|
|||||||
Reference in New Issue
Block a user