Message should arrive to the Web App

This commit is contained in:
Luis Fernando Molina committed 2021-11-10 12:02:02 +01:00
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))
}
}