|
@@ -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
|
|
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.
|
|
|
|
|
|
``_converse.api.listen.on('statusMessageChanged', function (message) { ... });``
|
|
``_converse.api.listen.on('statusMessageChanged', function (message) { ... });``
|
|
|
|
|
|
-serviceDiscovered
|
|
|
|
-~~~~~~~~~~~~~~~~~
|
|
|
|
-
|
|
|
|
-When converse.js has learned of a service provided by the XMPP server. See XEP-0030.
|
|
|
|
|
|
+streamFeaturesAdded
|
|
|
|
+~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
-``_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
|
|
~~~~~~~~~~~~~~~~~~
|
|
~~~~~~~~~~~~~~~~~~
|