1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Enable mesh agents to engage with plugins via the sendPeriodicServerUpdate call

This commit is contained in:
Ryan Blenis 2019-10-27 19:43:39 -04:00
parent dcd62405d3
commit daed74403a
3 changed files with 7 additions and 3 deletions

View file

@ -1278,7 +1278,11 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
if (typeof command.plugin != 'string') break;
try {
var pluginHandler = require('./pluginHandler.js').pluginHandler(parent.parent);
pluginHandler.plugins[command.plugin].serveraction(command, obj, parent);
if (command.plugin == '__all') {
pluginHandler.callHook(command.hook, command, obj, parent);
} else {
pluginHandler.plugins[command.plugin].serveraction(command, obj, parent);
}
} catch (e) {
console.log('Error loading plugin handler (' + e + ')');
}