From 1171bad1e4c9b30e8f8aa032c76d40ab006132bf Mon Sep 17 00:00:00 2001 From: uukelele-scratch Date: Tue, 21 Jan 2025 21:47:36 +0000 Subject: [PATCH] Update agent_proxy.js --- src/agent/agent_proxy.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/agent/agent_proxy.js b/src/agent/agent_proxy.js index feeba37..65cdff6 100644 --- a/src/agent/agent_proxy.js +++ b/src/agent/agent_proxy.js @@ -42,6 +42,14 @@ class AgentServerProxy { console.log(`Restarting agent: ${agentName}`); this.agent.cleanKill(); }); + + this.socket.on('send-message', (agentName, message) => { + try { + this.agent.respondFunc("NO USERNAME", message); + } catch (error) { + console.error('Error: ', JSON.stringify(error, Object.getOwnPropertyNames(error))); + } + }); } login() {