mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 07:55:46 +01:00
remove plugin.hook check
This commit is contained in:
@@ -326,12 +326,8 @@ Topics.isLocked = function (tid, callback) {
|
||||
};
|
||||
|
||||
Topics.search = function (tid, term, callback) {
|
||||
if (plugins.hasListeners('filter:topic.search')) {
|
||||
plugins.fireHook('filter:topic.search', {
|
||||
tid: tid,
|
||||
term: term,
|
||||
}, callback);
|
||||
} else {
|
||||
callback(new Error('[[error:no-plugins-available]]'), []);
|
||||
}
|
||||
plugins.fireHook('filter:topic.search', {
|
||||
tid: tid,
|
||||
term: term,
|
||||
}, callback);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user