diff --git a/index.js b/index.js index 4da52d4..a097b5e 100644 --- a/index.js +++ b/index.js @@ -229,7 +229,7 @@ function saveJson(app, name, id, json, res) fs.writeFile(pathForPluginId(app, id, name), JSON.stringify(json, null, 2), function(err) { if (err) { - app.debug(err.stack) + app.debug(err.stack) app.error(err) res.status(500) res.send(err) @@ -250,6 +250,8 @@ function send_push(app, device, message, path, state) secretAccessKey: device.secretAccessKey }); + message = `${state.charAt(0).toUpperCase() + state.slice(1)}: ${message}` + aps = { 'aps': { 'alert': {'body': message}, 'sound': 'default' }, 'path': path } aps["aps"]["category"] = path == "notifications.autopilot.PilotWayPointAdvance"