diff --git a/webServer.js b/webServer.js index 3b9b05a54..beafdf384 100644 --- a/webServer.js +++ b/webServer.js @@ -172,8 +172,6 @@ exports.newWebServer = function newWebServer(EVENTS_SERVER) { } case 'Webhook': { - console.log('ARRIVED') - console.log(JSON.stringify(requestParameters)) switch (requestParameters[2]) { case 'Fetch-Messages': { console.log('Fetch-Messages') @@ -182,12 +180,12 @@ exports.newWebServer = function newWebServer(EVENTS_SERVER) { break } case 'New-Message': { - console.log('New-Message') getBody(processRequest) - function processRequest(body) { - console.log(body) - webhookMessages.push(body) + function processRequest(messageReceived) { + let timestamp = (new Date()).valueOf() + + webhookMessages.push([timestamp,messageReceived]) respondWithContent(JSON.stringify(global.DEFAULT_OK_RESPONSE), response) } break