From 7dde2295178e92077522331c176e1da8da39b188 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 20 Mar 2015 12:21:27 -0400 Subject: [PATCH] added filter:teasers.get --- src/topics/teaser.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/topics/teaser.js b/src/topics/teaser.js index 0d67ad6360..adb4f77b5c 100644 --- a/src/topics/teaser.js +++ b/src/topics/teaser.js @@ -7,6 +7,7 @@ var async = require('async'), db = require('../database'), user = require('../user'), posts = require('../posts'), + plugins = require('../plugins'), utils = require('../../public/src/utils'); @@ -61,7 +62,9 @@ module.exports = function(Topics) { return tidToPost[topic.tid]; }); - callback(null, teasers); + plugins.fireHook('filter:teasers.get', {teasers: teasers}, function(err, data) { + callback(err, data ? data.teasers : null); + }); }); }); };