Emit an event after the user has sent out a chat room invitation. refs #215

This commit is contained in:
JC Brand 2014-08-31 21:54:17 +02:00
parent 67c00d779d
commit bf0d0320c5
2 changed files with 5 additions and 0 deletions

View File

@ -2045,6 +2045,7 @@
);
if (reason !== null) {
converse.connection.muc.rooms[this.model.get('id')].directInvite(suggestion.jid, reason);
converse.emit('roomInviteSent', this, suggestion.jid, reason);
}
$(ev.target).typeahead('val', '');
}, this));

View File

@ -761,6 +761,10 @@ Here are the different events that are emitted:
+----------------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
| **chatBoxToggled** | When a chat box has been minimized or maximized. | ``converse.on('chatBoxToggled', function (chatbox) { ... });`` |
+----------------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
| **roomInviteSent** | After the user has sent out a direct invitation, to a roster contact, asking them to join a room. | ``converse.on('roomInvite', function (roomview, invitee_jid, reason) { ... });`` |
+----------------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
| **roomInviteReceived** | After the user has sent out a direct invitation, to a roster contact, asking them to join a room. | ``converse.on('roomInvite', function (roomview, invitee_jid, reason) { ... });`` |
+----------------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
| **statusChanged** | When own chat status has changed. | ``converse.on('statusChanged', function (status) { ... });`` |
+----------------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
| **statusMessageChanged** | When own custom status message has changed. | ``converse.on('statusMessageChanged', function (message) { ... });`` |