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
@ -29,6 +29,7 @@ module.exports = function(RED) {
|
||||
this.password = credentials.password;
|
||||
}
|
||||
}
|
||||
|
||||
RED.nodes.registerType("xmpp-server",XMPPServerNode,{
|
||||
credentials: {
|
||||
user: {type:"text"},
|
||||
@ -36,7 +37,6 @@ module.exports = function(RED) {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function XmppInNode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
this.server = n.server;
|
||||
@ -116,6 +116,7 @@ module.exports = function(RED) {
|
||||
|
||||
node.on("close", function(done) {
|
||||
//xmpp.setPresence('offline');
|
||||
xmpp.disconnect();
|
||||
if (xmpp.conn) { xmpp.conn.end(); }
|
||||
xmpp = null;
|
||||
done();
|
||||
@ -203,6 +204,7 @@ module.exports = function(RED) {
|
||||
|
||||
node.on("close", function() {
|
||||
xmpp.setPresence('offline');
|
||||
xmpp.disconnect();
|
||||
if (xmpp.conn) { xmpp.conn.end(); }
|
||||
xmpp = null;
|
||||
});
|
||||
|
@ -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