Skip to content

Node.js based forum software built for the modern web

added new hook, filter:controllers.topic.get

Julian Lama8c818c6cd70
diff --git a/src/controllers/topics.js b/src/controllers/topics.js
index f912f20bd6..791baa0c79 100644
--- a/src/controllers/topics.js
+++ b/src/controllers/topics.js
@@ -11,6 +11,7 @@ var topicsController = {},
topics = require('../topics'),
posts = require('../posts'),
privileges = require('../privileges'),
+ plugins = require('../plugins'),
helpers = require('./helpers'),
utils = require('../../public/src/utils');
@@ -120,7 +121,9 @@ topicsController.get = function(req, res, next) {
topicData.posts.splice(0, 1);
}
- next(null, topicData);
+ plugins.fireHook('filter:controllers.topic.get', topicData, function(err, topicData) {
+ next(null, topicData);
+ });
});
},
function (topicData, next) {