mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
fix linting for grunt
This commit is contained in:
parent
c4a32cdb58
commit
f7be874e2c
@ -470,11 +470,12 @@ module.exports = function(RED) {
|
|||||||
if (stanza.attrs.type === 'error') {
|
if (stanza.attrs.type === 'error') {
|
||||||
var error = stanza.getChild('error');
|
var error = stanza.getChild('error');
|
||||||
if (error.attrs.code) {
|
if (error.attrs.code) {
|
||||||
|
var reas = "";
|
||||||
try {
|
try {
|
||||||
var reas = error.toString().split('><')[1].split(" xml")[0].trim();
|
reas = error.toString().split('><')[1].split(" xml")[0].trim();
|
||||||
if (reas == "registration-required") { reas = "membership-required"; }
|
if (reas == "registration-required") { reas = "membership-required"; }
|
||||||
}
|
}
|
||||||
catch(e) {};
|
catch(e) {}
|
||||||
var msg = {
|
var msg = {
|
||||||
topic:stanza.attrs.from,
|
topic:stanza.attrs.from,
|
||||||
payload: {
|
payload: {
|
||||||
@ -692,11 +693,12 @@ module.exports = function(RED) {
|
|||||||
if (stanza.attrs.type === 'error') {
|
if (stanza.attrs.type === 'error') {
|
||||||
var error = stanza.getChild('error');
|
var error = stanza.getChild('error');
|
||||||
if (error.attrs.code) {
|
if (error.attrs.code) {
|
||||||
|
var reas = "";
|
||||||
try {
|
try {
|
||||||
var reas = error.toString().split('><')[1].split(" xml")[0].trim();
|
reas = error.toString().split('><')[1].split(" xml")[0].trim();
|
||||||
if (reas == "registration-required") { reas = "membership-required"; }
|
if (reas == "registration-required") { reas = "membership-required"; }
|
||||||
}
|
}
|
||||||
catch(e) {};
|
catch(e) {}
|
||||||
var msg = {
|
var msg = {
|
||||||
topic:stanza.attrs.from,
|
topic:stanza.attrs.from,
|
||||||
payload: {
|
payload: {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-node-xmpp",
|
"name": "node-red-node-xmpp",
|
||||||
"version": "0.5.0",
|
"version": "0.5.1",
|
||||||
"description": "A Node-RED node to talk to an XMPP server",
|
"description": "A Node-RED node to talk to an XMPP server",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@xmpp/client": "^0.12.0"
|
"@xmpp/client": "^0.12.0"
|
||||||
|
@ -99,7 +99,7 @@ describe('RPI GPIO Node', function() {
|
|||||||
var n2 = helper.getNode("n2");
|
var n2 = helper.getNode("n2");
|
||||||
n2.on("input", function(msg) {
|
n2.on("input", function(msg) {
|
||||||
try {
|
try {
|
||||||
msg.should.have.property('topic', 'pi/7');
|
msg.should.have.property('topic', 'gpio/7');
|
||||||
msg.should.have.property('payload', 1);
|
msg.should.have.property('payload', 1);
|
||||||
done();
|
done();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
@ -117,7 +117,7 @@ describe('RPI GPIO Node', function() {
|
|||||||
var n2 = helper.getNode("n2");
|
var n2 = helper.getNode("n2");
|
||||||
n2.on("input", function(msg) {
|
n2.on("input", function(msg) {
|
||||||
try {
|
try {
|
||||||
msg.should.have.property('topic', 'pi/11');
|
msg.should.have.property('topic', 'gpio/11');
|
||||||
msg.should.have.property('payload', 0);
|
msg.should.have.property('payload', 0);
|
||||||
done();
|
done();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user