From 66aa443b7a2d2287eecbf9ca9725ac1efb215e23 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 24 Jul 2019 12:06:42 -0400 Subject: [PATCH] feat: added filter:tags.getAll plugin hook --- src/topics/tags.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/topics/tags.js b/src/topics/tags.js index 96dc21ea87..041d45c523 100644 --- a/src/topics/tags.js +++ b/src/topics/tags.js @@ -129,7 +129,10 @@ module.exports = function (Topics) { Topics.getTags = async function (start, stop) { const tags = await db.getSortedSetRevRangeWithScores('tags:topic:count', start, stop); - return await Topics.getTagData(tags); + const payload = await plugins.fireHook('filter:tags.getAll', { + tags: tags, + }); + return await Topics.getTagData(payload.tags); }; Topics.getTagData = async function (tags) {