Commit 4e67b420 authored by JC Brand's avatar JC Brand

New event streamFeaturesAdded

parent 291fceeb
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
- #968 Use nickname from VCard when joining a room - #968 Use nickname from VCard when joining a room
- #1091 There's now only one CSS file for all view modes. - #1091 There's now only one CSS file for all view modes.
- #1094 Show room members who aren't currently online - #1094 Show room members who aren't currently online
- #1106 Support for Roster Versioning
- It's now also possible to edit your VCard via the UI - It's now also possible to edit your VCard via the UI
- Automatically grow/shrink input as text is entered/removed - Automatically grow/shrink input as text is entered/removed
- MP4 and MP3 files when sent as XEP-0066 Out of Band Data, are now playable directly in chat - MP4 and MP3 files when sent as XEP-0066 Out of Band Data, are now playable directly in chat
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
Events and promises Events and promises
=================== ===================
Converse.js and its plugins emit various events which you can listen to via the Converse and its plugins emit various events which you can listen to via the
:ref:`listen-grouping`. :ref:`listen-grouping`.
Some of these events are also available as `ES2015 Promises <http://es6-features.org/#PromiseUsage>`_, Some of these events are also available as `ES2015 Promises <http://es6-features.org/#PromiseUsage>`_,
...@@ -466,6 +466,14 @@ Similar to `rosterInitialized`, but instead pertaining to reconnection. This ...@@ -466,6 +466,14 @@ Similar to `rosterInitialized`, but instead pertaining to reconnection. This
event indicates that the Backbone collections representing the roster and its event indicates that the Backbone collections representing the roster and its
groups are now again available after converse.js has reconnected. groups are now again available after converse.js has reconnected.
serviceDiscovered
~~~~~~~~~~~~~~~~~
When converse.js has learned of a service provided by the XMPP server. See XEP-0030.
``_converse.api.listen.on('serviceDiscovered', function (service) { ... });``
.. _`statusInitialized`: .. _`statusInitialized`:
statusInitialized statusInitialized
...@@ -497,12 +505,12 @@ When own custom status message has changed. ...@@ -497,12 +505,12 @@ When own custom status message has changed.
``_converse.api.listen.on('statusMessageChanged', function (message) { ... });`` ``_converse.api.listen.on('statusMessageChanged', function (message) { ... });``
serviceDiscovered streamFeaturesAdded
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
When converse.js has learned of a service provided by the XMPP server. See XEP-0030.
``_converse.api.listen.on('serviceDiscovered', function (service) { ... });`` Emitted as soon as Converse has processed the stream features as advertised by
the server. If you want to check whether a stream feature is supported before
proceeding, then you'll first want to wait for this event.
windowStateChanged windowStateChanged
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
......
// Converse.js // Converse.js
// https://conversejs.org // https://conversejs.org
// //
// Copyright (c) 2012-2018, the Converse.js developers // Copyright (c) 2013-2018, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2) // Licensed under the Mozilla Public License (MPLv2)
(function (root, factory) { (function (root, factory) {
......
...@@ -236,6 +236,7 @@ ...@@ -236,6 +236,7 @@
} }
} }
}); });
_converse.emit('streamFeaturesAdded');
} }
function initializeDisco () { function initializeDisco () {
......
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