From 28dd31a8e7053449710228df178384eb825e1d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 5 Nov 2021 14:12:45 -0400 Subject: [PATCH] fix: #9976 --- src/topics/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/topics/index.js b/src/topics/index.js index 06a6879c6c..67614927ae 100644 --- a/src/topics/index.js +++ b/src/topics/index.js @@ -319,11 +319,12 @@ Topics.isLocked = async function (tid) { }; Topics.search = async function (tid, term) { - const pids = await plugins.hooks.fire('filter:topic.search', { + const result = await plugins.hooks.fire('filter:topic.search', { tid: tid, term: term, + ids: [], }); - return Array.isArray(pids) ? pids : []; + return Array.isArray(result) ? result : result.ids; }; require('../promisify')(Topics);