From e249dc32dada8423fdf4692f08c5f6583feb0d61 Mon Sep 17 00:00:00 2001 From: Ryan Blenis Date: Mon, 28 Oct 2019 17:27:59 -0400 Subject: [PATCH] Introduce plugin hook to verified agents with non-recovery cores Introduce plugin hook to agent message data, should the plugin need to interact (without additional bandwidth used from those without plugins enabled) --- meshagent.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meshagent.js b/meshagent.js index c68b5f60..fcd7a67a 100644 --- a/meshagent.js +++ b/meshagent.js @@ -980,6 +980,9 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) { } }); } + if (parent.parent.pluginHandler != null) { + parent.parent.pluginHandler.callHook('hook_agentCoreIsStable', obj, parent); + } } // Get the web certificate private key hash for the specified domain @@ -1298,6 +1301,9 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) { break; } } + if (parent.parent.pluginHandler != null) { + parent.parent.pluginHandler.callHook('hook_processAgentData', command, obj, parent); + } } }