mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 18:46:01 +01:00
closes #5585
This commit is contained in:
@@ -10,7 +10,7 @@ var os = require('os');
|
||||
var db = require('../database');
|
||||
var meta = require('../meta');
|
||||
var pubsub = require('../pubsub');
|
||||
|
||||
var events = require('../events');
|
||||
|
||||
module.exports = function (Plugins) {
|
||||
if (nconf.get('isPrimary') === 'true') {
|
||||
@@ -52,6 +52,12 @@ module.exports = function (Plugins) {
|
||||
Plugins.fireHook(isActive ? 'action:plugin.deactivate' : 'action:plugin.activate', { id: id });
|
||||
setImmediate(next);
|
||||
},
|
||||
function (next) {
|
||||
events.log({
|
||||
type: 'plugin-' + (isActive ? 'deactivate' : 'activate'),
|
||||
text: id,
|
||||
}, next);
|
||||
},
|
||||
], function (err) {
|
||||
if (err) {
|
||||
winston.warn('[plugins] Could not toggle active state on plugin \'' + id + '\'');
|
||||
|
||||
Reference in New Issue
Block a user