mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #8269, return array of topics from hook
This commit is contained in:
@@ -298,7 +298,8 @@ module.exports = function (Topics) {
|
|||||||
|
|
||||||
Topics.getRelatedTopics = async function (topicData, uid) {
|
Topics.getRelatedTopics = async function (topicData, uid) {
|
||||||
if (plugins.hasListeners('filter:topic.getRelatedTopics')) {
|
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;
|
let maximumTopics = meta.config.maximumRelatedTopics;
|
||||||
|
|||||||
Reference in New Issue
Block a user