Commit e63853ee authored by JC Brand's avatar JC Brand

Add a `logout` event.

updates #714
parent 9cc6c682
...@@ -118,6 +118,13 @@ Once converse.js has been initialized. ...@@ -118,6 +118,13 @@ Once converse.js has been initialized.
See also `pluginsInitialized`_. See also `pluginsInitialized`_.
logout
~~~~~~
The user has logged out.
``converse.listen.on('logout', function (event) { ... });``
messageSend messageSend
~~~~~~~~~~~ ~~~~~~~~~~~
......
...@@ -540,6 +540,7 @@ ...@@ -540,6 +540,7 @@
converse.connection.disconnect(); converse.connection.disconnect();
converse.connection.reset(); converse.connection.reset();
} }
converse.emit('logout');
}; };
this.saveWindowState = function (ev, hidden) { this.saveWindowState = function (ev, hidden) {
......
...@@ -430,7 +430,7 @@ ...@@ -430,7 +430,7 @@
type: 'groupchat', type: 'groupchat',
id: msgid id: msgid
}).c("body").t(text).up() }).c("body").t(text).up()
.c("x", {xmlns: "jabber:x:event"}).c("composing"); .c("x", {xmlns: "jabber:x:event"}).c(converse.COMPOSING);
converse.connection.send(msg); converse.connection.send(msg);
this.model.messages.create({ this.model.messages.create({
fullname: this.model.get('nick'), fullname: this.model.get('nick'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment