diff --git a/Network/botProfile.js b/Network/botProfile.js index 2be6b4437..e7ce60b41 100644 --- a/Network/botProfile.js +++ b/Network/botProfile.js @@ -109,38 +109,40 @@ exports.newBotProfile = function newBotProfile() { } function addFollowing( - targetUserProfileId + targetUserProfileId, + targetBotProfileId ) { - if (thisObject.following.get(targetUserProfileId) === undefined) { - thisObject.following.set(targetUserProfileId, targetUserProfileId) + if (thisObject.following.get(targetBotProfileId) === undefined) { + thisObject.following.set(targetBotProfileId, { targetUserProfileId: targetUserProfileId, targetBotProfileId: targetBotProfileId }) } else { throw ('Already Following.') } } function removeFollowing( - targetUserProfileId + targetBotProfileId ) { - if (thisObject.following.get(targetUserProfileId) !== undefined) { - thisObject.following.delete(targetUserProfileId) + if (thisObject.following.get(targetBotProfileId) !== undefined) { + thisObject.following.delete(targetBotProfileId) } else { throw ('Not Following.') } } function addFollower( - emitterUserProfileId + emitterUserProfileId, + emitterBotProfileId ) { - if (thisObject.followers.get(emitterUserProfileId) === undefined) { - thisObject.followers.set(emitterUserProfileId, emitterUserProfileId) + if (thisObject.followers.get(emitterBotProfileId) === undefined) { + thisObject.followers.set(emitterBotProfileId, { emitterUserProfileId: emitterUserProfileId, emitterBotProfileId: emitterBotProfileId }) } } function removeFollower( - emitterUserProfileId + emitterBotProfileId ) { - if (thisObject.followers.get(emitterUserProfileId) !== undefined) { - thisObject.followers.delete(emitterUserProfileId) + if (thisObject.followers.get(emitterBotProfileId) !== undefined) { + thisObject.followers.delete(emitterBotProfileId) } } } diff --git a/Network/event.js b/Network/event.js index 2afa3effa..b586d9077 100644 --- a/Network/event.js +++ b/Network/event.js @@ -289,9 +289,11 @@ exports.newEvent = function newEvent() { } emitterBotProfile.addFollowing( + targetUserProfileId, targetBotProfileId ) targetBotProfile.addFollower( + emitterUserProfileId, emitterBotProfileId ) break