Message should arrive to the Web App
This commit is contained in:
1 parent
450d3d26df
commit
578f36eceb
10 files changed
+121
-65
No files matched your search
@@ -0,0 +1,29 @@
|
||||
exports.newSocialTradingModulesP2PNetworkInterface = function newSocialTradingModulesP2PNetworkInterface() {
|
||||
/*
|
||||
This module handles the incoming messages from the P2P Network
|
||||
that are not responses to requests sent.
|
||||
|
||||
This is the case for any kind of events happening at entities followed
|
||||
by the user running this app, in particular trading events.
|
||||
*/
|
||||
let thisObject = {
|
||||
messageReceived: messageReceived,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
|
||||
}
|
||||
|
||||
async function messageReceived(message) {
|
||||
message.messageId = undefined
|
||||
DK.webSocketsInterface.sendToWebApp(JSON.stringify(response))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user