Browse Source

Pass message on to message handler

master
Starbeamrainbowlabs 3 years ago
parent
commit
d65f512003
  1. 7
      server/ttn-app-server/MessageHandler.mjs
  2. 2
      server/ttn-app-server/TTNAppServer.mjs

7
server/ttn-app-server/MessageHandler.mjs

@ -7,8 +7,11 @@ class MessageHandler {
}
async handle(payload) {
console.log(arguments);
async handle(message) {
console.log(message);
let decoded_payload = decode_payload(message.payload_raw);
console.log(decoded_payload);
}
}

2
server/ttn-app-server/TTNAppServer.mjs

@ -66,7 +66,7 @@ class TTNAppServer {
}
this.log.log(`[mqtt/handler] ${topic}: `, message_object);
// await this.message_handler.handle(payload);
await this.message_handler.handle(message_object);
}
}

Loading…
Cancel
Save