From c7011e4183107b33c52451fe792d4039da67ec26 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 13:11:22 +0200 Subject: [PATCH] added userprofileId to Bot --- Network/botProfile.js | 3 +++ Network/event.js | 1 + Network/userProfile.js | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Network/botProfile.js b/Network/botProfile.js index a85bcfa57..2be6b4437 100644 --- a/Network/botProfile.js +++ b/Network/botProfile.js @@ -7,6 +7,7 @@ exports.newBotProfile = function newBotProfile() { */ let thisObject = { /* Unique Keys */ + userProfileId: undefined, botProfileId: undefined, botProfileHandle: undefined, /* Bot Unitque Properties */ @@ -45,11 +46,13 @@ exports.newBotProfile = function newBotProfile() { } function initialize( + userProfileId, botProfileId, botAsset, botExchange, botEnabled ) { + thisObject.userProfileId = userProfileId thisObject.botProfileId = botProfileId thisObject.botAsset = botAsset thisObject.botExchange = botExchange diff --git a/Network/event.js b/Network/event.js index b3329a046..2afa3effa 100644 --- a/Network/event.js +++ b/Network/event.js @@ -374,6 +374,7 @@ exports.newEvent = function newEvent() { switch (thisObject.eventType) { case EVENT_TYPES.ADD_BOT: { emitterUserProfile.addBot( + thisObject.emitterUserProfileId, thisObject.emitterBotProfileId, thisObject.botAsset, thisObject.botExchange, diff --git a/Network/userProfile.js b/Network/userProfile.js index 88a0d26f4..0144038cd 100644 --- a/Network/userProfile.js +++ b/Network/userProfile.js @@ -149,6 +149,7 @@ exports.newUserProfile = function newUserProfile() { } function addBot( + userProfileId, botProfileId, botAsset, botExchange, @@ -160,6 +161,7 @@ exports.newUserProfile = function newUserProfile() { } else { let bot = NT.modules.BOTS.newBot() bot.initialize( + userProfileId, botProfileId, botAsset, botExchange,