fix: #8269, return array of topics from hook

v1.18.x
Barış Soner Uşaklı 5 years ago
parent 267567a086
commit 4eafe0f057

@ -298,7 +298,8 @@ module.exports = function (Topics) {
Topics.getRelatedTopics = async function (topicData, uid) {
if (plugins.hasListeners('filter:topic.getRelatedTopics')) {
return await plugins.fireHook('filter:topic.getRelatedTopics', { topic: topicData, uid: uid });
const result = await plugins.fireHook('filter:topic.getRelatedTopics', { topic: topicData, uid: uid, topics: [] });
return result.topics;
}
let maximumTopics = meta.config.maximumRelatedTopics;

Loading…
Cancel
Save