Storing Signal Data at the Social Graph

This commit is contained in:
Luis Fernando Molina committed 2021-11-13 12:14:42 +01:00
1 parent e54be502c9
commit 9fab335a30
4 files changed
+23 -9

No files matched your search

+4 -2
View File
@@ -128,8 +128,10 @@ exports.newSocialTradingModulesSignal = function newSocialTradingModulesSignal()
thisObject.targetBotProfileId,
thisObject.emitterPostHash,
thisObject.targetPostHash,
thisObject.signalType - 20,
thisObject.timestamp
SA.projects.socialTrading.globals.postTypes.SIGNAL_POST,
thisObject.timestamp,
thisObject.signalType,
thisObject.signalData
)
return true
}
@@ -4,8 +4,9 @@ exports.newSocialTradingGlobalsPostTypes = function () {
/* Post Types */
NEW_POST: 0,
REPLY_TO_POST: 1,
REPOST_: 2,
QUOTE_REPOST_: 3
REPOST: 2,
QUOTE_REPOST: 3,
SIGNAL_POST: 4
}
return thisObject
@@ -75,7 +75,9 @@ exports.newSocialTradingModulesSocialGraphBotProfile = function newSocialTrading
emitterPostHash,
targetPostHash,
postType,
timestamp
timestamp,
signalType,
signalData
) {
if (thisObject.posts.get(emitterPostHash) !== undefined) {
throw ('Post Already Exists.')
@@ -89,7 +91,9 @@ exports.newSocialTradingModulesSocialGraphBotProfile = function newSocialTrading
emitterPostHash,
targetPostHash,
postType,
timestamp
timestamp,
signalType,
signalData
)
thisObject.posts.set(emitterPostHash, post)
@@ -23,6 +23,9 @@ exports.newSocialTradingModulesSocialGraphPost = function newSocialTradingModule
/* Post Unique Properties */
postType: undefined,
timestamp: undefined,
/* Signal Related Properties */
signalType: undefined,
signalData: undefined,
/* Maps */
replies: undefined,
reactions: undefined,
@@ -60,7 +63,9 @@ exports.newSocialTradingModulesSocialGraphPost = function newSocialTradingModule
emitterPostHash,
targetPostHash,
postType,
timestamp
timestamp,
signalType,
signalData
) {
thisObject.emitterUserProfileId = emitterUserProfileId
@@ -71,13 +76,15 @@ exports.newSocialTradingModulesSocialGraphPost = function newSocialTradingModule
thisObject.targetPostHash = targetPostHash
thisObject.postType = postType
thisObject.timestamp = timestamp
thisObject.signalType = signalType
thisObject.signalData = signalData
/*
Let's find the Target Post
*/
if (
thisObject.postType === SA.projects.socialTrading.globals.postTypes.REPLY_TO_POST ||
thisObject.postType === SA.projects.socialTrading.globals.postTypes.REPOST_ ||
thisObject.postType === SA.projects.socialTrading.globals.postTypes.QUOTE_REPOST_
thisObject.postType === SA.projects.socialTrading.globals.postTypes.REPOST ||
thisObject.postType === SA.projects.socialTrading.globals.postTypes.QUOTE_REPOST
) {
/*
Validate Target User Profile.