|
@@ -162,6 +162,16 @@ Default: ``e.g. conversejs.org``
|
|
|
|
|
|
The placeholder text shown in the domain input on the registration form.
|
|
The placeholder text shown in the domain input on the registration form.
|
|
|
|
|
|
|
|
+jid
|
|
|
|
+---
|
|
|
|
+
|
|
|
|
+The Jabber ID or "JID" of the current user. The JID uniquely identifies a user
|
|
|
|
+on the XMPP network. It looks like an email address, but it's used for instant
|
|
|
|
+messaging instead.
|
|
|
|
+
|
|
|
|
+This value needs to be provided when using the :ref:`keepalive` option.
|
|
|
|
+
|
|
|
|
+
|
|
.. _`keepalive`:
|
|
.. _`keepalive`:
|
|
|
|
|
|
keepalive
|
|
keepalive
|
|
@@ -172,6 +182,12 @@ Default: ``true``
|
|
Determines whether Converse.js will maintain the chat session across page
|
|
Determines whether Converse.js will maintain the chat session across page
|
|
loads.
|
|
loads.
|
|
|
|
|
|
|
|
+When using keepalive, you will have to provide the `jid`_ of the current user
|
|
|
|
+to ensure that a cached session is only resumed if it belongs to the current
|
|
|
|
+user.
|
|
|
|
+
|
|
|
|
+This setting should also be used in conjunction with :ref:`prebind` and :ref:`keepalive`.
|
|
|
|
+
|
|
See also:
|
|
See also:
|
|
|
|
|
|
* :ref:`session-support`
|
|
* :ref:`session-support`
|
|
@@ -310,13 +326,14 @@ There are two complementary configuration settings to ``prebind``.
|
|
They are :ref:`keepalive` and :ref:`prebind_url`.
|
|
They are :ref:`keepalive` and :ref:`prebind_url`.
|
|
|
|
|
|
``keepalive`` can be used keep the session alive without having to pass in
|
|
``keepalive`` can be used keep the session alive without having to pass in
|
|
-new tokens to ``converse.initialize`` every time you reload the page. This
|
|
|
|
-removes the need to set up a new BOSH session every time a page loads.
|
|
|
|
|
|
+new RID and SID tokens to ``converse.initialize`` every time you reload the page.
|
|
|
|
+This removes the need to set up a new BOSH session every time a page loads.
|
|
|
|
+You do however still need to supply the user's JID so that converse.js can be
|
|
|
|
+sure that the session it's resuming is for the right user.
|
|
|
|
|
|
``prebind_url`` lets you specify a URL which converse.js will call whenever a
|
|
``prebind_url`` lets you specify a URL which converse.js will call whenever a
|
|
new BOSH session needs to be set up.
|
|
new BOSH session needs to be set up.
|
|
|
|
|
|
-
|
|
|
|
Here's an example of converse.js being initialized with these three options:
|
|
Here's an example of converse.js being initialized with these three options:
|
|
|
|
|
|
.. code-block:: javascript
|
|
.. code-block:: javascript
|
|
@@ -324,6 +341,7 @@ Here's an example of converse.js being initialized with these three options:
|
|
converse.initialize({
|
|
converse.initialize({
|
|
bosh_service_url: 'https://bind.example.com',
|
|
bosh_service_url: 'https://bind.example.com',
|
|
keepalive: true,
|
|
keepalive: true,
|
|
|
|
+ jid: me@example.com,
|
|
prebind: true,
|
|
prebind: true,
|
|
prebind_url: 'http://example.com/api/prebind',
|
|
prebind_url: 'http://example.com/api/prebind',
|
|
allow_logout: false
|
|
allow_logout: false
|
|
@@ -333,7 +351,7 @@ Here's an example of converse.js being initialized with these three options:
|
|
simplifies the code needed to set up and maintain prebinded sessions.
|
|
simplifies the code needed to set up and maintain prebinded sessions.
|
|
|
|
|
|
When using ``prebind_url`` and ``keepalive``, you don't need to manually pass in
|
|
When using ``prebind_url`` and ``keepalive``, you don't need to manually pass in
|
|
- the RID, SID and JID tokens anymore.
|
|
|
|
|
|
+ the RID, SID tokens anymore, but you still need to provide the JID.
|
|
|
|
|
|
|
|
|
|
.. _`prebind_url`:
|
|
.. _`prebind_url`:
|