node-red-contrib-ibmpush
Advanced tools
Comparing version 0.2.4 to 0.2.5
/** | ||
* Copyright 2014, 2016 IBM Corp. | ||
* | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
@@ -86,3 +86,3 @@ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
// read the credential(appSecret) | ||
var credentials = RED.nodes.getCredentials(n.id); | ||
var credentials = RED.nodes.getCredentials(n.id); | ||
@@ -128,2 +128,5 @@ if (isBound) { | ||
// Read the identifiers from the message dynamically | ||
this.identifiers = msg.identifiers || this.identifiers; | ||
if (this.identifiers != null) | ||
@@ -146,3 +149,3 @@ ids = this.identifiers.split(','); | ||
console.log("The mode is "+this.mode); | ||
//console.log("The mode is "+this.mode); | ||
@@ -155,7 +158,7 @@ switch (this.notificationType) { | ||
case "tags": | ||
message.target = { | ||
"tagNames": ids | ||
} | ||
invokePush('SANDBOX',message,this); | ||
invokePush(this.mode,message,this); | ||
break; | ||
@@ -167,3 +170,3 @@ | ||
} | ||
invokePush('SANDBOX',message,this); | ||
invokePush(this.mode,message,this); | ||
break; | ||
@@ -175,3 +178,3 @@ | ||
} | ||
invokePush('SANDBOX',message,this); | ||
invokePush(this.mode,message,this); | ||
break; | ||
@@ -183,3 +186,3 @@ | ||
} | ||
invokePush('SANDBOX',message,this); | ||
invokePush(this.mode,message,this); | ||
@@ -211,3 +214,3 @@ break; | ||
}; | ||
function callback(error, response, body) { | ||
@@ -217,3 +220,3 @@ if (!error && response.statusCode == 202) { | ||
node.status({}); | ||
} else { | ||
@@ -224,5 +227,5 @@ node.error(response.statusCode +" : "+body.message); | ||
} | ||
request(options, callback); | ||
node.status({fill:"blue",shape:"dot",text:"Sending"}); | ||
} |
{ | ||
"name": "node-red-contrib-ibmpush", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"license": "Apache-2.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ibm-messaging/iot-nodered/tree/master/node-red-contrib-ibmpush" | ||
"url": "https://github.com/ibm-watson-iot/node-red-contrib-ibmpush" | ||
}, | ||
@@ -9,0 +9,0 @@ "description": "This node can be used to push notifications to mobiles from the Node-RED flow. It uses the IBM Push Notification service in Bluemix", |
@@ -35,2 +35,4 @@ node-red-contrib-ibmpush | ||
Visit this [link](https://new-console.ng.bluemix.net/docs/services/mobilepush/c_overview_push.html) for more information on IBM Push Notification for Bluemix | ||
Visit this [link](https://new-console.ng.bluemix.net/docs/services/mobilepush/c_overview_push.html) for more information on IBM Push Notification for Bluemix | ||
======= |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41001
8
180
37