mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
escape some errors
This commit is contained in:
parent
25e4134b51
commit
8d0bdfd985
@ -188,7 +188,7 @@ module.exports = function(RED) {
|
|||||||
if (RED.settings.verbose || LOGITALL) {that.log("got an iq query"); }
|
if (RED.settings.verbose || LOGITALL) {that.log("got an iq query"); }
|
||||||
if (stanza.attrs.type === 'error') {
|
if (stanza.attrs.type === 'error') {
|
||||||
if (RED.settings.verbose || LOGITALL) {that.log("oh noes, it's an error"); }
|
if (RED.settings.verbose || LOGITALL) {that.log("oh noes, it's an error"); }
|
||||||
if (that && that.hasOwnProperty("lastUsed") && that.lastUsed.hasOwnProperty("id") && stanza.attrs.id === that.lastUsed.id) {
|
if (that?.lastUsed?.id && stanza.attrs.id === that.lastUsed.id) {
|
||||||
that.lastUsed.status({fill:"red", shape:"ring", text:stanza.getChild('error')});
|
that.lastUsed.status({fill:"red", shape:"ring", text:stanza.getChild('error')});
|
||||||
that.lastUsed.warn(stanza.getChild('error'));
|
that.lastUsed.warn(stanza.getChild('error'));
|
||||||
}
|
}
|
||||||
@ -529,7 +529,7 @@ module.exports = function(RED) {
|
|||||||
statusText = status.getText() || "online";
|
statusText = status.getText() || "online";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (statusText !== "" && (stanza.attrs.from !== stanza.attrs.to)) {
|
if (statusText !== "" && stanza.attrs.from && (stanza.attrs.from !== stanza.attrs.to)) {
|
||||||
var from = stanza.attrs.from;
|
var from = stanza.attrs.from;
|
||||||
var msg = {
|
var msg = {
|
||||||
topic:from,
|
topic:from,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-node-xmpp",
|
"name": "node-red-node-xmpp",
|
||||||
"version": "0.6.1",
|
"version": "0.6.2",
|
||||||
"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.13.1"
|
"@xmpp/client": "^0.13.1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user