mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Tidy up xmpp node formatting
(diff looks awful… it isn’t really)
This commit is contained in:
parent
4e63566dbf
commit
c5db30d0c4
@ -28,14 +28,14 @@ module.exports = function(RED) {
|
||||
this.username = credentials.user;
|
||||
this.password = credentials.password;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RED.nodes.registerType("xmpp-server",XMPPServerNode,{
|
||||
credentials: {
|
||||
user: {type:"text"},
|
||||
password: {type: "password"}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function XmppInNode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
@ -116,11 +116,12 @@ module.exports = function(RED) {
|
||||
|
||||
node.on("close", function(done) {
|
||||
//xmpp.setPresence('offline');
|
||||
xmpp.disconnect();
|
||||
if (xmpp.conn) { xmpp.conn.end(); }
|
||||
xmpp = null;
|
||||
done();
|
||||
});
|
||||
}
|
||||
}
|
||||
RED.nodes.registerType("xmpp in",XmppInNode);
|
||||
|
||||
function XmppOutNode(n) {
|
||||
@ -203,10 +204,11 @@ module.exports = function(RED) {
|
||||
|
||||
node.on("close", function() {
|
||||
xmpp.setPresence('offline');
|
||||
xmpp.disconnect();
|
||||
if (xmpp.conn) { xmpp.conn.end(); }
|
||||
xmpp = null;
|
||||
});
|
||||
}
|
||||
}
|
||||
RED.nodes.registerType("xmpp out",XmppOutNode);
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red-node-xmpp",
|
||||
"version" : "0.0.5",
|
||||
"version" : "0.0.6",
|
||||
"description" : "A Node-RED node to talk to an XMPP server",
|
||||
"dependencies" : {
|
||||
"simple-xmpp" : "0.1.92"
|
||||
|
Loading…
Reference in New Issue
Block a user