@ -417,4 +417,8 @@ SocketTopics.searchTags = function(socket, data, callback) {
topics.searchTags(data, callback);
};
SocketTopics.search = function(socket, data, callback) {
topics.search(data.tid, data.term, callback);
module.exports = SocketTopics;
@ -446,4 +446,15 @@ var async = require('async'),
});
Topics.search = function(tid, term, callback) {
if (plugins.hasListeners('filter:topic.search')) {
plugins.fireHook('filter:topic.search', {
tid: tid,
term: term
}, callback);
} else {
callback(undefined, []);
}
}(exports));