From 4eafe0f0577c8f8ef77c1c8cea57c8c20bf4426f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 23 Apr 2020 11:32:24 -0400 Subject: [PATCH] fix: #8269, return array of topics from hook --- src/topics/tags.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/topics/tags.js b/src/topics/tags.js index 2508445d66..192d5e8a26 100644 --- a/src/topics/tags.js +++ b/src/topics/tags.js @@ -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;