in content/device.js [121:131]
async processDirectMethods(method, payload, rid) {
this.writeToConsole("Direct Method received: <pre>" + method + "(" + payload + ")</pre>", "green")
let response = 'unknown command'
let status = 404
if (method == 'sendTextMessage') {
response = {"messageRead": true}
status = 200
}
this.writeToConsole("Direct Method response: <pre>(status: " + status + ", payload: " + "<pre>" + this.syntaxHighlight(response) + "</pre>" + ")</pre>", "green")
await client.commandResponse(method, JSON.stringify(response), rid, status)
},