fix linting for grunt

This commit is contained in:
Dave Conway-Jones 2021-03-12 09:36:20 +00:00
parent c4a32cdb58
commit f7be874e2c
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
3 changed files with 9 additions and 7 deletions

View File

@ -470,11 +470,12 @@ module.exports = function(RED) {
if (stanza.attrs.type === 'error') {
var error = stanza.getChild('error');
if (error.attrs.code) {
var reas = "";
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"; }
}
catch(e) {};
catch(e) {}
var msg = {
topic:stanza.attrs.from,
payload: {
@ -692,11 +693,12 @@ module.exports = function(RED) {
if (stanza.attrs.type === 'error') {
var error = stanza.getChild('error');
if (error.attrs.code) {
var reas = "";
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"; }
}
catch(e) {};
catch(e) {}
var msg = {
topic:stanza.attrs.from,
payload: {

View File

@ -1,6 +1,6 @@
{
"name": "node-red-node-xmpp",
"version": "0.5.0",
"version": "0.5.1",
"description": "A Node-RED node to talk to an XMPP server",
"dependencies": {
"@xmpp/client": "^0.12.0"

View File

@ -99,7 +99,7 @@ describe('RPI GPIO Node', function() {
var n2 = helper.getNode("n2");
n2.on("input", function(msg) {
try {
msg.should.have.property('topic', 'pi/7');
msg.should.have.property('topic', 'gpio/7');
msg.should.have.property('payload', 1);
done();
} catch(err) {
@ -117,7 +117,7 @@ describe('RPI GPIO Node', function() {
var n2 = helper.getNode("n2");
n2.on("input", function(msg) {
try {
msg.should.have.property('topic', 'pi/11');
msg.should.have.property('topic', 'gpio/11');
msg.should.have.property('payload', 0);
done();
} catch(err) {