mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
parent
e5e8a33d80
commit
d913171f40
@ -221,8 +221,14 @@ module.exports = function(RED) {
|
|||||||
msg.payload = incoming.iden;
|
msg.payload = incoming.iden;
|
||||||
}
|
}
|
||||||
else if (incoming.type === 'sms_changed') {
|
else if (incoming.type === 'sms_changed') {
|
||||||
msg.topic = "SMS: "+ incoming.notifications[0].title;
|
if (incoming.notifications && incoming.notifications.length > 0) {
|
||||||
msg.payload = incoming.notifications[0].body;
|
msg.topic = "SMS: "+ incoming.notifications[0].title;
|
||||||
|
msg.payload = incoming.notifications[0].body;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
msg.topic = "SMS: ";
|
||||||
|
msg.payload = "";
|
||||||
|
}
|
||||||
msg.message = incoming;
|
msg.message = incoming;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -244,12 +250,11 @@ module.exports = function(RED) {
|
|||||||
|
|
||||||
function PushbulletOut(n) {
|
function PushbulletOut(n) {
|
||||||
RED.nodes.createNode(this, n);
|
RED.nodes.createNode(this, n);
|
||||||
var self = this;
|
|
||||||
|
|
||||||
this.title = n.title;
|
this.title = n.title;
|
||||||
this.chan = n.chan;
|
this.chan = n.chan;
|
||||||
this.pushtype = n.pushtype;
|
this.pushtype = n.pushtype;
|
||||||
this.pusher = null;
|
this.pusher = null;
|
||||||
|
var self = this;
|
||||||
|
|
||||||
var configNode;
|
var configNode;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "node-red-node-pushbullet",
|
"name" : "node-red-node-pushbullet",
|
||||||
"version" : "0.0.17",
|
"version" : "0.0.19",
|
||||||
"description" : "A Node-RED node to send alerts via Pushbullet",
|
"description" : "A Node-RED node to send alerts via Pushbullet",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"pushbullet": "^2.4.0",
|
"pushbullet": "^2.4.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user