2015-05-02 01:21:25 +02:00
|
|
|
.. raw:: html
|
|
|
|
|
|
|
|
<div id="banner"><a href="https://github.com/jcbrand/converse.js/blob/master/docs/source/configuration.rst">Edit me on GitHub</a></div>
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
=============
|
|
|
|
Configuration
|
|
|
|
=============
|
|
|
|
|
2018-02-09 11:55:53 +01:00
|
|
|
The included minified JavaScript and CSS files can be used for demoing or testing, but
|
2014-12-07 00:53:17 +01:00
|
|
|
you'll want to configure *Converse.js* to suit your needs before you deploy it
|
|
|
|
on your website.
|
|
|
|
|
|
|
|
*Converse.js* is passed its configuration settings when you call its *initialize* method.
|
|
|
|
|
|
|
|
You'll most likely want to call the *initialize* method in your HTML page. For
|
|
|
|
an example of how this is done, please see the bottom of the *./index.html* page.
|
|
|
|
|
2017-08-09 15:50:24 +02:00
|
|
|
Please refer to the `Configuration settings`_ section below for info on
|
2014-12-07 00:53:17 +01:00
|
|
|
all the available configuration settings.
|
|
|
|
|
|
|
|
After you have configured *Converse.js*, you'll have to regenerate the minified
|
2018-02-09 11:55:53 +01:00
|
|
|
JavaScript file so that it will include the new settings. Please refer to the
|
2014-12-07 00:53:17 +01:00
|
|
|
:ref:`minification` section for more info on how to do this.
|
|
|
|
|
2017-07-05 11:03:13 +02:00
|
|
|
.. _`configuration-settings`:
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2017-07-05 11:03:13 +02:00
|
|
|
Configuration settings
|
|
|
|
======================
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
authentication
|
|
|
|
--------------
|
|
|
|
|
|
|
|
* Default: ``login``
|
2016-09-16 14:35:02 +02:00
|
|
|
* Allowed values: `login`_, `external`, `anonymous`_, `prebind`_
|
2015-04-02 13:07:59 +02:00
|
|
|
|
|
|
|
This option states the way converse.js will authenticate.
|
|
|
|
|
|
|
|
login
|
|
|
|
~~~~~
|
|
|
|
|
|
|
|
The default means is ``login``, which means that the user either logs in manually with their
|
|
|
|
username and password, or automatically if used together with ``auto_login=true``
|
|
|
|
and ``jid`` and ``password`` values. See `auto_login`_.
|
|
|
|
|
2016-09-16 14:35:02 +02:00
|
|
|
external
|
|
|
|
~~~~~~~~
|
|
|
|
|
|
|
|
This setting will still show a login form and submit button, but the form will
|
|
|
|
only contain an input for the user's JID, *not* for the password.
|
|
|
|
|
|
|
|
That's because this setting is intended to be used when you are using
|
|
|
|
SASL-EXTERNAL as authentication mechanism, in which case a password is usually
|
|
|
|
not required.
|
|
|
|
|
2016-11-03 15:38:29 +01:00
|
|
|
SASL-EXTERNAL is generally used together with x509 client certificates to
|
|
|
|
enable passwordless login or 2-factor authentication.
|
|
|
|
|
|
|
|
For more details on this, `read this blog post <https://opkode.com/blog/strophe_converse_sasl_external/>`_.
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
anonymous
|
|
|
|
~~~~~~~~~
|
|
|
|
|
|
|
|
This enables anonymous login if the XMPP server supports it. This option can be
|
|
|
|
used together with `auto_login`_ to automatically and anonymously log a user in
|
|
|
|
as soon as the page loads.
|
|
|
|
|
2016-05-17 18:04:01 +02:00
|
|
|
The server's domain is passed in via the `jid`_ setting.
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
prebind
|
|
|
|
~~~~~~~
|
|
|
|
|
|
|
|
See also: :ref:`session-support`
|
|
|
|
|
|
|
|
Use this option when you want to attach to an existing XMPP
|
|
|
|
`BOSH <https://en.wikipedia.org/wiki/BOSH>`_ session.
|
|
|
|
|
|
|
|
Usually a BOSH session is set up server-side in your web app.
|
|
|
|
|
|
|
|
Attaching to an existing BOSH session that was set up server-side is useful
|
|
|
|
when you want to maintain a persistent single session for your users instead of
|
|
|
|
requiring them to log in manually.
|
|
|
|
|
|
|
|
When a BOSH session is initially created, you'll receive three tokens.
|
|
|
|
A JID (jabber ID), SID (session ID) and RID (Request ID).
|
|
|
|
|
|
|
|
Converse.js needs these tokens in order to attach to that same session.
|
|
|
|
|
|
|
|
There are two complementary configuration settings to ``prebind``.
|
2015-04-25 22:40:55 +02:00
|
|
|
They are :ref:`keepalive` and `prebind_url`_.
|
2015-04-02 13:07:59 +02:00
|
|
|
|
|
|
|
``keepalive`` can be used keep the session alive without having to pass in
|
|
|
|
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.
|
|
|
|
|
2015-04-25 22:40:55 +02:00
|
|
|
`prebind_url`_ lets you specify a URL which converse.js will call whenever a
|
2015-04-02 13:07:59 +02:00
|
|
|
new BOSH session needs to be set up.
|
|
|
|
|
|
|
|
Here's an example of converse.js being initialized with these three options:
|
|
|
|
|
|
|
|
.. code-block:: javascript
|
|
|
|
|
|
|
|
converse.initialize({
|
|
|
|
bosh_service_url: 'https://bind.example.com',
|
|
|
|
keepalive: true,
|
|
|
|
jid: 'me@example.com',
|
|
|
|
authentication: 'prebind',
|
|
|
|
prebind_url: 'http://example.com/api/prebind',
|
|
|
|
allow_logout: false
|
|
|
|
});
|
|
|
|
|
2016-11-24 09:51:01 +01:00
|
|
|
allow_bookmarks
|
|
|
|
---------------
|
|
|
|
|
|
|
|
* Default: ``true``
|
|
|
|
|
|
|
|
Enables/disables chatroom bookmarks functionality.
|
|
|
|
This setting is only applicable if the ``converse-bookmarks`` plugin is loaded.
|
|
|
|
|
2018-02-08 15:39:27 +01:00
|
|
|
See also: `allow_public_bookmarks`_
|
|
|
|
|
2015-06-18 16:31:30 +02:00
|
|
|
allow_chat_pending_contacts
|
|
|
|
---------------------------
|
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
Allow the user to chat with pending contacts.
|
|
|
|
|
2015-03-09 19:47:01 +01:00
|
|
|
allow_contact_removal
|
|
|
|
---------------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``true``
|
2015-03-09 19:47:01 +01:00
|
|
|
|
|
|
|
Allow the user to remove roster contacts by clicking on the delete icon
|
2018-02-09 11:55:53 +01:00
|
|
|
(i.e. trashcan) next to a contact's name in the roster.
|
2015-03-09 19:47:01 +01:00
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
allow_contact_requests
|
|
|
|
----------------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``true``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
Allow users to add one another as contacts. If this is set to false, the
|
|
|
|
**Add a contact** widget, **Contact Requests** and **Pending Contacts** roster
|
|
|
|
sections will all not appear. Additionally, all incoming contact requests will be
|
|
|
|
ignored.
|
|
|
|
|
2015-09-22 14:39:52 +02:00
|
|
|
allow_dragresize
|
|
|
|
----------------
|
|
|
|
|
|
|
|
* Default: ``true``
|
|
|
|
|
2015-09-26 00:11:21 +02:00
|
|
|
Allow users to resize chats by dragging the edges. The min-height and min-width
|
2018-02-09 11:55:53 +01:00
|
|
|
CSS properties set on a chatboxes (specifically on the ``#converse.js .chatbox > .box-flyout`` element)
|
2015-09-26 00:11:21 +02:00
|
|
|
will be honored, IF they are set in pixels.
|
2015-09-22 14:39:52 +02:00
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
allow_muc
|
|
|
|
---------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``true``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
Allow multi-user chat (muc) in chatrooms. Setting this to ``false`` will remove
|
|
|
|
the ``Chatrooms`` tab from the control box.
|
|
|
|
|
2016-06-10 16:13:52 +02:00
|
|
|
allow_muc_invitations
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
* Default: ``true``
|
|
|
|
|
2018-02-09 11:55:53 +01:00
|
|
|
Allows users to be invited to join MUC chatrooms. An "Invite" widget will
|
|
|
|
appear in the sidebar of the chatroom where you can type in the JID of a user
|
|
|
|
to invite into the chatroom.
|
2016-06-10 16:13:52 +02:00
|
|
|
|
2017-10-31 18:07:03 +01:00
|
|
|
.. _`allow_non_roster_messaging`:
|
|
|
|
|
2017-02-01 10:14:36 +01:00
|
|
|
allow_non_roster_messaging
|
|
|
|
--------------------------
|
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
Determines whether you'll receive messages from users that are not in your
|
|
|
|
roster. The XMPP specification allows for this (similar to email).
|
|
|
|
Setting this to `true` increases your chances of receiving spam (when using a
|
|
|
|
federated server), while setting it to `false` means that people not on your
|
|
|
|
roster can't contact you unless one (or both) of you subscribe to one another's
|
|
|
|
presence (i.e. adding as a roster contact).
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
allow_otr
|
|
|
|
---------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``true``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
Allow Off-the-record encryption of single-user chat messages.
|
|
|
|
|
2018-02-08 15:39:27 +01:00
|
|
|
allow_public_bookmarks
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
Some XMPP servers don't support private PEP/PubSub nodes, as required for
|
|
|
|
private bookmarks and outlined in `XEP-0223 <https://xmpp.org/extensions/xep-0223.html>`_.
|
|
|
|
|
|
|
|
Even though Converse.js asks for the bookmarks to be kept private (via the
|
|
|
|
`<publish-options>` XML node), the server simply ignores the privacy settings
|
|
|
|
and publishes the node contents under the default privacy setting, which makes
|
|
|
|
the information available to all roster contacts.
|
|
|
|
|
|
|
|
If your your XMPP server does not support `XEP-0223`'s ``#publish-options``
|
|
|
|
feature and you don't mind that your room bookmarks are visible to all
|
|
|
|
contacts, then you can set this setting to ``true``. Otherwise you won't be
|
|
|
|
able to have any room bookmarks at all for an account on that XMPP server.
|
|
|
|
|
2015-01-05 18:08:40 +01:00
|
|
|
allow_registration
|
2015-02-11 15:02:04 +01:00
|
|
|
------------------
|
2015-01-05 18:08:40 +01:00
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``true``
|
2015-01-05 18:08:40 +01:00
|
|
|
|
|
|
|
Support for `XEP-0077: In band registration <http://xmpp.org/extensions/xep-0077.html>`_
|
|
|
|
|
|
|
|
Allow XMPP account registration showing the corresponding UI register form interface.
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
animate
|
|
|
|
-------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``true``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2018-02-09 11:55:53 +01:00
|
|
|
Show animations, for example when opening and closing chatboxes.
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2015-08-24 18:42:08 +02:00
|
|
|
archived_messages_page_size
|
|
|
|
---------------------------
|
|
|
|
|
2017-02-27 22:12:15 +01:00
|
|
|
* Default: ``50``
|
2015-08-24 18:42:08 +02:00
|
|
|
|
2016-08-21 12:49:54 +02:00
|
|
|
See also: `message_archiving`_
|
2015-08-24 18:42:08 +02:00
|
|
|
|
|
|
|
This feature applies to `XEP-0313: Message Archive Management (MAM) <https://xmpp.org/extensions/xep-0313.html>`_
|
|
|
|
and will only take effect if your server supports MAM.
|
|
|
|
|
|
|
|
It allows you to specify the maximum amount of archived messages to be returned per query.
|
2018-02-09 11:55:53 +01:00
|
|
|
When you open a chatbox or room, archived messages will be displayed (if
|
2015-08-24 18:42:08 +02:00
|
|
|
available) and the amount returned will be no more than the page size.
|
|
|
|
|
2018-02-09 11:55:53 +01:00
|
|
|
You will be able to query for even older messages by scrolling upwards in the chatbox or room
|
2015-08-24 18:42:08 +02:00
|
|
|
(the so-called infinite scrolling pattern).
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
auto_list_rooms
|
|
|
|
---------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``false``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
If true, and the XMPP server on which the current user is logged in supports
|
|
|
|
multi-user chat, then a list of rooms on that server will be fetched.
|
|
|
|
|
2018-02-09 11:55:53 +01:00
|
|
|
Not recommended for servers with lots of chatrooms.
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
For each room on the server a query is made to fetch further details (e.g.
|
|
|
|
features, number of occupants etc.), so on servers with many rooms this
|
|
|
|
option will create lots of extra connection traffic.
|
|
|
|
|
2017-09-13 11:14:58 +02:00
|
|
|
.. _`auto_login`:
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
auto_login
|
|
|
|
----------
|
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
This option can be used to let converse.js automatically log the user in as
|
|
|
|
soon as the page loads.
|
|
|
|
|
2016-01-15 07:18:22 +01:00
|
|
|
It should be used either with ``authentication`` set to ``anonymous`` or to ``login``.
|
2015-04-02 13:07:59 +02:00
|
|
|
|
|
|
|
If ``authentication`` is set to ``login``, then you will also need to provide a
|
2017-05-03 09:16:01 +02:00
|
|
|
valid ``jid`` and ``password`` values, either manually by passing them in, or
|
|
|
|
by the `credentials_url`_ setting. Setting a ``credentials_url`` is preferable
|
|
|
|
to manually passing in ``jid`` and ``password`` values, because it allows
|
|
|
|
better reconnection with ``auto_reconnect``. When the connection drops,
|
|
|
|
converse.js will automatically fetch new login credentials from the
|
|
|
|
``credentials_url`` and reconnect.
|
2015-04-02 13:07:59 +02:00
|
|
|
|
2016-05-17 18:04:01 +02:00
|
|
|
If ``authentication`` is set to ``anonymous``, then you will also need to provide the
|
|
|
|
server's domain via the `jid`_ setting.
|
|
|
|
|
2016-01-15 07:18:22 +01:00
|
|
|
This is a useful setting if you'd like to create a custom login form in your
|
2017-09-03 22:12:17 +02:00
|
|
|
website. You'll need to write some JavaScript to accept that custom form's
|
2016-01-15 07:18:22 +01:00
|
|
|
login credentials, then you can pass those credentials (``jid`` and
|
|
|
|
``password``) to ``converse.initialize`` to start converse.js and log the user
|
|
|
|
into their XMPP account.
|
|
|
|
|
2015-05-13 13:51:24 +02:00
|
|
|
auto_away
|
|
|
|
---------
|
|
|
|
|
|
|
|
* Default: ``0``
|
|
|
|
|
2015-06-22 00:01:31 +02:00
|
|
|
The amount of seconds after which the user's presence status should
|
|
|
|
automatically become ``away``.
|
2015-05-13 13:51:24 +02:00
|
|
|
|
2015-06-22 00:01:31 +02:00
|
|
|
If the user's status is ``extended away``, it won't be changed to ``away``.
|
|
|
|
|
|
|
|
If the given value is negative or ``0``, this option is disabled.
|
2015-05-13 13:51:24 +02:00
|
|
|
|
|
|
|
auto_xa
|
|
|
|
-------
|
|
|
|
|
|
|
|
* Default: ``0``
|
|
|
|
|
2015-06-22 00:01:31 +02:00
|
|
|
The amount of seconds after which the user's presence status should
|
|
|
|
automatically become ``extended away``.
|
2015-05-13 13:51:24 +02:00
|
|
|
|
2015-06-22 00:01:31 +02:00
|
|
|
If the value is negative or ``0``, the function is disabled.
|
2015-05-13 13:51:24 +02:00
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
auto_reconnect
|
|
|
|
--------------
|
|
|
|
|
2017-04-04 13:20:40 +02:00
|
|
|
* Default: ``false``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
Automatically reconnect to the XMPP server if the connection drops
|
|
|
|
unexpectedly.
|
|
|
|
|
2016-08-19 16:11:37 +02:00
|
|
|
This option works best when you have `authentication` set to `prebind` and have
|
|
|
|
also specified a `prebind_url` URL, from where converse.js can fetch the BOSH
|
|
|
|
tokens. In this case, converse.js will automaticallly reconnect when the
|
|
|
|
connection drops but also reestablish earlier lost connections (due to
|
|
|
|
network outages, closing your laptop etc.).
|
|
|
|
|
|
|
|
When `authentication` is set to `login`, then this option will only work when
|
|
|
|
the page hasn't been reloaded yet, because then the user's password has been
|
|
|
|
wiped from memory. This configuration can however still be useful when using
|
|
|
|
converse.js in desktop apps, for example those based on `CEF <https://bitbucket.org/chromiumembedded/cef>`_
|
|
|
|
or `electron <http://electron.atom.io/>`_.
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
auto_subscribe
|
|
|
|
--------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``false``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
If true, the user will automatically subscribe back to any contact requests.
|
|
|
|
|
2015-12-02 11:14:17 +01:00
|
|
|
auto_join_on_invite
|
2016-01-13 08:55:42 +01:00
|
|
|
-------------------
|
2015-12-02 11:14:17 +01:00
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
If true, the user will automatically join a chatroom on invite without any confirm.
|
|
|
|
|
2016-03-22 09:15:52 +01:00
|
|
|
|
|
|
|
auto_join_rooms
|
|
|
|
---------------
|
|
|
|
|
|
|
|
* Default: ``[]``
|
|
|
|
|
|
|
|
This settings allows you to provide a list of groupchat conversations to be
|
|
|
|
automatically joined once the user has logged in.
|
|
|
|
|
|
|
|
You can either specify a simple list of room JIDs, in which case your nickname
|
|
|
|
will be taken from your JID, or you can specify a list of maps, where each map
|
|
|
|
specifies the room's JID and the nickname that should be used.
|
|
|
|
|
2017-02-16 20:29:48 +01:00
|
|
|
For example::
|
2016-03-22 09:15:52 +01:00
|
|
|
|
|
|
|
`[{'jid': 'room@example.org', 'nick': 'WizardKing69' }]`
|
|
|
|
|
2017-11-02 15:30:24 +01:00
|
|
|
|
|
|
|
blacklisted_plugins
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
* Default: ``[]`` (``['converse-minimize', 'converse-dragresize']`` for inVerse)
|
|
|
|
|
|
|
|
A list of plugin names that are blacklisted and will therefore not be
|
|
|
|
initialized once ``converse.initialize`` is called, even if the same plugin is
|
|
|
|
whitelisted.
|
|
|
|
|
|
|
|
From Converse.js 3.0 onwards most of the API is available only to plugins and
|
|
|
|
all plugins need to be whitelisted first.
|
|
|
|
|
|
|
|
The usecase for blacklisting is generally to disable removed core plugins
|
|
|
|
(which are automatically whitelisted) to prevent other (potentially malicious)
|
|
|
|
plugins from registering themselves under those names.
|
|
|
|
|
|
|
|
The core, and by default whitelisted, plugins are::
|
|
|
|
|
|
|
|
converse-bookmarks
|
|
|
|
converse-chatview
|
|
|
|
converse-controlbox
|
|
|
|
converse-core
|
|
|
|
converse-dragresize
|
|
|
|
converse-headline
|
|
|
|
converse-mam
|
|
|
|
converse-minimize
|
|
|
|
converse-muc
|
|
|
|
converse-notification
|
|
|
|
converse-otr
|
|
|
|
converse-ping
|
|
|
|
converse-register
|
|
|
|
converse-rosterview
|
|
|
|
converse-vcard
|
|
|
|
|
|
|
|
An example from `the embedded room demo <https://conversejs.org/demo/embedded.html>`_
|
|
|
|
|
|
|
|
.. code-block:: javascript
|
|
|
|
|
|
|
|
require(['converse-core', 'converse-muc-embedded'], function (converse) {
|
|
|
|
converse.initialize({
|
|
|
|
// other settings removed for brevity
|
|
|
|
blacklisted_plugins: [
|
|
|
|
'converse-controlbox',
|
|
|
|
'converse-dragresize',
|
|
|
|
'converse-minimize',
|
|
|
|
'converse-vcard'
|
|
|
|
],
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
.. _`bosh-service-url`:
|
|
|
|
|
|
|
|
bosh_service_url
|
|
|
|
----------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``undefined``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2015-02-08 19:35:58 +01:00
|
|
|
To connect to an XMPP server over HTTP you need a `BOSH <https://en.wikipedia.org/wiki/BOSH>`_
|
|
|
|
connection manager which acts as a middle man between the HTTP and XMPP
|
|
|
|
protocols.
|
|
|
|
|
|
|
|
The bosh_service_url setting takes the URL of a BOSH connection manager.
|
|
|
|
|
|
|
|
Please refer to your XMPP server's documentation on how to enable BOSH.
|
2014-12-07 00:53:17 +01:00
|
|
|
For more information, read this blog post: `Which BOSH server do you need? <http://metajack.im/2008/09/08/which-bosh-server-do-you-need>`_
|
|
|
|
|
2015-02-08 19:35:58 +01:00
|
|
|
A more modern alternative to BOSH is to use `websockets <https://developer.mozilla.org/en/docs/WebSockets>`_.
|
|
|
|
Please see the :ref:`websocket-url` configuration setting.
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
cache_otr_key
|
|
|
|
-------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``false``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
Let the `OTR (Off-the-record encryption) <https://otr.cypherpunks.ca>`_ private
|
|
|
|
key be cached in your browser's session storage.
|
|
|
|
|
|
|
|
The browser's session storage persists across page loads but is deleted once
|
|
|
|
the tab or window is closed.
|
|
|
|
|
|
|
|
If this option is set to ``false``, a new OTR private key will be generated
|
|
|
|
for each page load. While more inconvenient, this is a much more secure option.
|
|
|
|
|
|
|
|
This setting can only be used together with ``allow_otr = true``.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
A browser window's session storage is accessible by all javascript that
|
|
|
|
is served from the same domain. So if there is malicious javascript served by
|
|
|
|
the same server (or somehow injected via an attacker), then they will be able
|
|
|
|
to retrieve your private key and read your all the chat messages in your
|
|
|
|
current session. Previous sessions however cannot be decrypted.
|
|
|
|
|
2016-03-31 10:37:28 +02:00
|
|
|
chatstate_notification_blacklist
|
|
|
|
--------------------------------
|
2016-03-18 10:10:14 +01:00
|
|
|
|
|
|
|
* Default: ``[]``
|
|
|
|
|
|
|
|
A list of JIDs to be ignored when showing desktop notifications of changed chat states.
|
|
|
|
|
|
|
|
Some user's clients routinely connect and disconnect (likely on mobile) and
|
|
|
|
each time a chat state notificaion is received (``online`` when connecting and
|
|
|
|
then ``offline`` when disconnecting).
|
|
|
|
|
|
|
|
When desktop notifications are turned on (see `show-desktop-notifications`_),
|
|
|
|
then you'll receive notification messages each time this happens.
|
|
|
|
|
|
|
|
Receiving constant notifications that a user's client is connecting and disconnecting
|
|
|
|
is annoying, so this option allows you to ignore those JIDs.
|
|
|
|
|
2016-10-12 13:55:47 +02:00
|
|
|
connection_options
|
|
|
|
------------------
|
|
|
|
|
|
|
|
* Default: ``{}``
|
|
|
|
* Type: Object
|
|
|
|
|
|
|
|
Converse.js relies on `Strophe.js <http://strophe.im>`_ to establish and
|
|
|
|
maintain a connection to the XMPP server.
|
|
|
|
|
|
|
|
This option allows you to pass a map of configuration options to be passed into
|
|
|
|
the ``Strophe.Connection`` constructor.
|
|
|
|
|
|
|
|
For documentation on the configuration options that ``Strophe.Connection``
|
|
|
|
accepts, refer to the
|
|
|
|
`Strophe.Connection documentation <http://strophe.im/strophejs/doc/1.2.8/files/strophe-js.html#Strophe.Connection.Strophe.Connection>`_.
|
|
|
|
|
|
|
|
As an example, suppose you want to restrict the supported SASL authentication
|
|
|
|
mechanisms, then you'd pass in the ``mechanisms`` as a ``connection_options``
|
2017-02-16 20:29:48 +01:00
|
|
|
``key:value`` pair:
|
|
|
|
|
2017-03-03 16:16:41 +01:00
|
|
|
.. code-block:: javascript
|
2016-10-12 13:55:47 +02:00
|
|
|
|
|
|
|
converse.initialize({
|
|
|
|
connection_options: {
|
|
|
|
'mechanisms': [
|
|
|
|
converse.env.Strophe.SASLMD5,
|
|
|
|
]
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2017-03-03 16:16:41 +01:00
|
|
|
.. _`credentials_url`:
|
|
|
|
|
2016-03-31 10:37:28 +02:00
|
|
|
credentials_url
|
|
|
|
---------------
|
|
|
|
|
|
|
|
* Default: ``null``
|
|
|
|
* Type: URL
|
|
|
|
|
|
|
|
This setting should be used in conjunction with ``authentication`` set to ``login`` and :ref:`keepalive` set to ``true``.
|
|
|
|
|
|
|
|
It allows you to specify a URL which converse.js will call when it needs to get
|
|
|
|
the username and password (or authentication token) which converse.js will use
|
|
|
|
to automatically log the user in.
|
|
|
|
|
2017-05-03 09:16:01 +02:00
|
|
|
If ``auto_reconnect`` is also set to true, then converse.js will automatically
|
|
|
|
fetch new credentials from the ``credentials_url`` whenever the connection or
|
|
|
|
session drops, and then attempt to reconnect and establish a new session.
|
|
|
|
|
2016-03-31 10:37:28 +02:00
|
|
|
The server behind ``credentials_url`` should return a JSON encoded object::
|
|
|
|
|
|
|
|
{
|
|
|
|
"jid": "me@example.com/resource",
|
|
|
|
"password": "Ilikecats!",
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-06-22 00:01:31 +02:00
|
|
|
csi_waiting_time
|
|
|
|
----------------
|
|
|
|
|
|
|
|
* Default: ``0``
|
|
|
|
|
2016-03-30 17:49:19 +02:00
|
|
|
This option adds support for `XEP-0352 Client State Indication <http://xmpp.org/extensions/xep-0352.html>_`
|
2015-06-22 00:01:31 +02:00
|
|
|
|
|
|
|
If converse.js is idle for the configured amount of seconds, a chat state
|
|
|
|
indication of ``inactive`` will be sent out to the XMPP server (if the server
|
|
|
|
supports CSI).
|
|
|
|
|
|
|
|
Afterwards, ss soon as there is any activity (for example, the mouse moves),
|
|
|
|
a chat state indication of ``active`` will be sent out.
|
|
|
|
|
2016-03-30 17:49:19 +02:00
|
|
|
A value of ``0`` means that this feature is disabled.
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
debug
|
|
|
|
-----
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``false``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
If set to true, debugging output will be logged to the browser console.
|
|
|
|
|
2016-01-15 10:31:36 +01:00
|
|
|
default_domain
|
|
|
|
--------------
|
|
|
|
|
|
|
|
* Default: ``undefined``
|
|
|
|
|
|
|
|
Specify a domain to act as the default for user JIDs. This allows users to log
|
|
|
|
in with only the username part of their JID, instead of the full JID.
|
|
|
|
|
2017-08-15 10:23:57 +02:00
|
|
|
For example, if ``default_domain`` is ``example.org``, then the user
|
2016-01-15 10:31:36 +01:00
|
|
|
``johnny@example.org`` can log in with only ``johnny``.
|
|
|
|
|
|
|
|
JIDs with other domains are still allowed but need to be provided in full.
|
|
|
|
To specify only one domain and disallow other domains, see the `locked_domain`_
|
|
|
|
option.
|
|
|
|
|
2017-03-20 13:21:03 +01:00
|
|
|
registration_domain
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
* Default: ``''``
|
|
|
|
|
|
|
|
Specify a domain name for which the registration form will be fetched automatically,
|
|
|
|
without the user having to enter any XMPP server domain name.
|
|
|
|
|
2016-05-31 10:03:06 +02:00
|
|
|
default_state
|
|
|
|
-------------
|
|
|
|
|
|
|
|
* Default: ``'online'``
|
|
|
|
|
|
|
|
The default chat status that the user wil have. If you for example set this to
|
|
|
|
``'chat'``, then converse.js will send out a presence stanza with ``"show"``
|
|
|
|
set to ``'chat'`` as soon as you've been logged in.
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
domain_placeholder
|
|
|
|
------------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``e.g. conversejs.org``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
The placeholder text shown in the domain input on the registration form.
|
|
|
|
|
2017-07-16 12:27:21 +02:00
|
|
|
|
|
|
|
emojione_image_path
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
* Default: ``'https://cdn.jsdelivr.net/emojione/assets/' + emojioneVersion + '/png/'``
|
|
|
|
|
|
|
|
When `use_emojione`_ is set to ``true``, then this is the URL from where PNG image files for
|
|
|
|
displaying emojis will be fetched.
|
|
|
|
|
|
|
|
|
2016-01-18 11:37:59 +01:00
|
|
|
expose_rid_and_sid
|
|
|
|
------------------
|
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
Allow the prebind tokens, RID (request ID) and SID (session ID), to be exposed
|
|
|
|
globally via the API. This allows other scripts served on the same page to use
|
|
|
|
these values.
|
|
|
|
|
|
|
|
*Beware*: a malicious script could use these tokens to assume your identity
|
|
|
|
and inject fake chat messages.
|
|
|
|
|
2016-05-28 08:35:16 +02:00
|
|
|
filter_by_resource
|
|
|
|
------------------
|
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
Before version 1.0.3 converse.js would ignore received messages if they were
|
|
|
|
intended for a different resource then the current user had. It was decided to
|
|
|
|
drop this restriction but leave it configurable.
|
|
|
|
|
2016-01-18 11:37:59 +01:00
|
|
|
forward_messages
|
|
|
|
----------------
|
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
If set to ``true``, sent messages will also be forwarded to the sending user's
|
|
|
|
bare JID (their Jabber ID independent of any chat clients aka resources).
|
|
|
|
|
|
|
|
This means that sent messages are visible from all the user's chat clients,
|
|
|
|
and not just the one from which it was actually sent.
|
|
|
|
|
|
|
|
This is especially important for web chat, such as converse.js, where each
|
|
|
|
browser tab functions as a separate chat client, with its own resource.
|
|
|
|
|
|
|
|
This feature uses Stanza forwarding, see also `XEP 0297: Stanza Forwarding <http://www.xmpp.org/extensions/xep-0297.html>`_
|
|
|
|
|
|
|
|
For an alternative approach, see also `message_carbons`_.
|
|
|
|
|
|
|
|
fullname
|
|
|
|
--------
|
|
|
|
|
|
|
|
If you are using prebinding, can specify the fullname of the currently
|
|
|
|
logged in user, otherwise the user's vCard will be fetched.
|
|
|
|
|
2016-10-26 15:21:36 +02:00
|
|
|
.. _`hide_muc_server`:
|
|
|
|
|
2016-01-18 11:37:59 +01:00
|
|
|
hide_muc_server
|
|
|
|
---------------
|
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
Hide the ``server`` input field of the form inside the ``Room`` panel of the
|
|
|
|
controlbox. Useful if you want to restrict users to a specific XMPP server of
|
|
|
|
your choosing.
|
|
|
|
|
|
|
|
hide_offline_users
|
|
|
|
------------------
|
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
If set to ``true``, then don't show offline users.
|
|
|
|
|
2017-05-07 18:58:52 +02:00
|
|
|
hide_open_bookmarks
|
|
|
|
-------------------
|
|
|
|
|
2017-06-13 21:40:06 +02:00
|
|
|
* Default: ``false`` (``true`` for inVerse).
|
2017-05-07 18:58:52 +02:00
|
|
|
|
|
|
|
This setting applies to the ``converse-bookmarks`` plugin and specfically the
|
|
|
|
list of bookmarks shown in the ``Rooms`` tab of the control box.
|
|
|
|
|
|
|
|
By default all bookmarks are shown in that list, if this setting is set to
|
|
|
|
``true``, then only bookmarks for rooms not currently open (i.e. that the
|
|
|
|
current user hasn't joined), are shown.
|
|
|
|
|
|
|
|
Makes sense to set this to ``true`` when also using the non-core
|
|
|
|
``converse-roomslist`` plugin, which shows a list of currently open (i.e.
|
|
|
|
"joined") rooms.
|
|
|
|
|
2016-01-18 11:37:59 +01:00
|
|
|
include_offline_state
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
* Default: `false`
|
|
|
|
|
|
|
|
Originally, converse.js included an `offline` state which the user could
|
|
|
|
choose (along with `online`, `busy` and `away`).
|
|
|
|
|
|
|
|
Eventually it was however decided to remove this state, since the `offline`
|
|
|
|
state doesn't propagate across tabs like the others do.
|
|
|
|
|
|
|
|
What's meant by "propagate across tabs", is that when you set the state to
|
|
|
|
`offline` in one tab, and you have instances of converse.js open in other tabs
|
|
|
|
in your browser, then those instances will not have their states changed to
|
|
|
|
`offline` as well. For the other statees the change is however propagated.
|
|
|
|
|
|
|
|
The reason for this is that according to the XMPP spec, there is no `offline`
|
|
|
|
state. The only defined states are:
|
|
|
|
|
|
|
|
* away -- The entity or resource is temporarily away.
|
|
|
|
* chat -- The entity or resource is actively interested in chattiIng.
|
|
|
|
* dnd -- The entity or resource is busy (dnd = "Do Not Disturb").
|
|
|
|
* xa -- The entity or resource is away for an extended period (xa = "eXtended Away").
|
|
|
|
|
2017-02-16 20:29:48 +01:00
|
|
|
Read the `relevant section in the XMPP spec <https://xmpp.org/rfcs/rfc6121.html#presence-syntax-children-show>`_
|
|
|
|
for more info.
|
2016-01-18 11:37:59 +01:00
|
|
|
|
|
|
|
What used to happen in converse.js when the `offline` state was chosen, is
|
|
|
|
that a presence stanza with a `type` of `unavailable` was sent out.
|
|
|
|
|
|
|
|
This is actually exactly what happens when you log out of converse.js as well,
|
|
|
|
with the notable exception that in the `offline` state, the connection is not
|
|
|
|
terminated. So you can at any time change your state to something else and
|
|
|
|
start chatting again.
|
|
|
|
|
|
|
|
This might be useful to people, however the fact that the `offline` state
|
|
|
|
doesn't propagate across tabs means that the user experience is inconsistent,
|
|
|
|
confusing and appears "broken".
|
|
|
|
|
|
|
|
If you are however aware of this issue and still want to allow the `offline`
|
|
|
|
state, then you can set this option to `true` to enable it.
|
|
|
|
|
2017-10-30 10:25:30 +01:00
|
|
|
.. _`i18n`:
|
|
|
|
|
2016-01-18 11:37:59 +01:00
|
|
|
i18n
|
|
|
|
----
|
|
|
|
|
2017-09-24 20:36:39 +02:00
|
|
|
* Default: Auto-detection of the User/Browser language or ``en``;
|
2016-01-18 11:37:59 +01:00
|
|
|
|
2017-09-24 20:36:39 +02:00
|
|
|
Specify the locale/language.
|
|
|
|
|
|
|
|
The translations for that locale must be available in JSON format at the
|
|
|
|
`locales_url`_
|
|
|
|
|
|
|
|
If an explicit locale is specified via the ``i18n`` setting and the
|
|
|
|
translations for that locale are not found at the `locales_url``, then
|
|
|
|
then Converse.js will fall back to trying to determine the browser's language
|
|
|
|
and fetching those translations, or if that fails the default English texts
|
|
|
|
will be used.
|
2016-01-18 11:37:59 +01:00
|
|
|
|
2015-03-21 21:32:04 +01:00
|
|
|
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.
|
|
|
|
|
2015-03-21 21:50:48 +01:00
|
|
|
This value needs to be provided when using the :ref:`keepalive` option together
|
|
|
|
with `prebind`_.
|
2015-03-21 21:32:04 +01:00
|
|
|
|
|
|
|
|
2015-02-08 19:35:58 +01:00
|
|
|
.. _`keepalive`:
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
keepalive
|
|
|
|
---------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``true``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
Determines whether Converse.js will maintain the chat session across page
|
|
|
|
loads.
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
This setting should also be used in conjunction with ``authentication`` set to `prebind`_.
|
2015-03-21 21:32:04 +01:00
|
|
|
|
2015-03-21 21:50:48 +01:00
|
|
|
When using ``keepalive`` and ``prebind``, 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.
|
2015-03-21 21:32:04 +01:00
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
See also:
|
|
|
|
|
|
|
|
* :ref:`session-support`
|
|
|
|
|
2015-02-08 19:35:58 +01:00
|
|
|
.. note::
|
|
|
|
Currently the "keepalive" setting only works with BOSH and not with
|
|
|
|
websockets. This is because XMPP over websocket does not use the same
|
|
|
|
session token as with BOSH. A possible solution for this is to implement
|
|
|
|
`XEP-0198 <http://xmpp.org/extensions/xep-0198.html>`_, specifically
|
|
|
|
with regards to "stream resumption".
|
|
|
|
|
2017-10-30 10:25:30 +01:00
|
|
|
.. _`locales`:
|
|
|
|
|
|
|
|
locales
|
|
|
|
-------
|
|
|
|
|
|
|
|
* Default:
|
|
|
|
|
|
|
|
.. code-block:: javascript
|
|
|
|
|
|
|
|
locales: [
|
|
|
|
'af', 'ca', 'de',
|
|
|
|
'es', 'en', 'fr',
|
|
|
|
'he', 'hu', 'id',
|
|
|
|
'it', 'ja', 'nb',
|
|
|
|
'nl', 'pl', 'pt_BR',
|
|
|
|
'ru', 'uk', 'zh'
|
|
|
|
]
|
|
|
|
|
|
|
|
This setting restricts the locales that are supported by Converse.js and
|
|
|
|
therefore what may be given as value for the :ref:`i18n` option.
|
|
|
|
|
|
|
|
Any other locales will be ignored.
|
|
|
|
|
|
|
|
When self-hosting, also make sure that the locales are served and therefore
|
|
|
|
fetchable (via ``XMLHttpRequest``) at the URL specified by :ref:`locales-url`.
|
|
|
|
|
|
|
|
.. _`locales-url`:
|
|
|
|
|
2017-09-24 20:36:39 +02:00
|
|
|
locales_url
|
|
|
|
-----------
|
|
|
|
|
|
|
|
* Default: ``/locale/{{{locale}}}/LC_MESSAGES/converse.json``,
|
|
|
|
|
|
|
|
The URL from where Converse.js should fetch translation JSON.
|
|
|
|
|
|
|
|
The three curly braces ``{{{ }}}`` are
|
2017-10-30 10:25:30 +01:00
|
|
|
`Mustache <https://github.com/janl/mustache.js#readme>`_-style
|
2017-09-24 20:36:39 +02:00
|
|
|
variable interpolation which HTML-escapes the value being inserted. It's
|
|
|
|
important that the inserted value is HTML-escaped, otherwise a malicious script
|
|
|
|
injection attack could be attempted.
|
|
|
|
|
|
|
|
The variable being interpolated via the curly braces is ``locale``, which is
|
|
|
|
the value passed in to the `i18n`_ setting, or the browser's locale or the
|
|
|
|
default local or `en` (resolved in that order).
|
|
|
|
|
|
|
|
From version 3.3.0, Converse.js no longer bundles all translations into its
|
|
|
|
final build file. Instead, only the relevant translations are fetched at
|
|
|
|
runtime.
|
|
|
|
|
|
|
|
This change also means that it's no longer possible to pass in the translation
|
|
|
|
JSON data directly into ``_converse.initialize`` via the `i18n`_ setting.
|
|
|
|
Instead, you only specify the language code (e.g. `de`) and that language's
|
|
|
|
JSON translations will automatically be fetched via XMLHTTPRequest at
|
|
|
|
``locales_url``.
|
|
|
|
|
2016-01-18 11:41:41 +01:00
|
|
|
locked_domain
|
|
|
|
-------------
|
|
|
|
|
|
|
|
* Default: ``undefined``
|
|
|
|
|
|
|
|
Similar to `default_domain`_ but no other domains are allowed.
|
2015-07-10 15:07:53 +02:00
|
|
|
|
2017-08-15 10:23:57 +02:00
|
|
|
For example, if ``locked_domain`` is set to ``example.org``, then the user
|
|
|
|
``johnny@example.org`` can log in with only ``johnny``.
|
|
|
|
|
|
|
|
Additionally, only users registered on the ``example.org`` host can log in, no
|
|
|
|
other users are allowed to log in.
|
|
|
|
|
2015-07-17 20:57:00 +02:00
|
|
|
message_archiving
|
|
|
|
-----------------
|
2015-07-10 15:07:53 +02:00
|
|
|
|
2017-02-12 20:01:07 +01:00
|
|
|
* Default: ``undefined``
|
2015-07-10 15:07:53 +02:00
|
|
|
|
2016-07-25 15:34:44 +02:00
|
|
|
Provides support for `XEP-0313: Message Archive Management <https://xmpp.org/extensions/xep-0313.html>`_,
|
2017-02-12 20:01:07 +01:00
|
|
|
whereby messages are archived in the XMPP server for later retrieval.
|
|
|
|
Note, your XMPP server must support XEP-0313 MAM for this to work.
|
|
|
|
|
|
|
|
This option sets the default archiving preference.
|
|
|
|
Valid values are ``undefined``, ``never``, ``always`` and ``roster``.
|
2015-07-10 15:07:53 +02:00
|
|
|
|
2017-02-12 20:01:07 +01:00
|
|
|
``undefined`` means that any existing MAM configuration, as set by the user or
|
|
|
|
the server administrator, will be used.
|
2015-07-10 15:07:53 +02:00
|
|
|
|
|
|
|
``roster`` means that only messages to and from JIDs in your roster will be
|
|
|
|
archived. The other two values are self-explanatory.
|
|
|
|
|
2016-03-07 18:16:57 +01:00
|
|
|
|
|
|
|
message_archiving_timeout
|
|
|
|
-------------------------
|
|
|
|
|
|
|
|
* Default: ``8000``
|
|
|
|
|
|
|
|
The amount of time (in milliseconds) to wait when requesting archived messages
|
|
|
|
from the XMPP server.
|
|
|
|
|
|
|
|
Used in conjunction with `message_archiving` and in context of `XEP-0313: Message Archive Management <https://xmpp.org/extensions/xep-0313.html>`_.
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
message_carbons
|
|
|
|
---------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``false``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
Support for `XEP-0280: Message Carbons <https://xmpp.org/extensions/xep-0280.html>`_
|
|
|
|
|
|
|
|
In order to keep all IM clients for a user engaged in a conversation,
|
|
|
|
outbound messages are carbon-copied to all interested resources.
|
|
|
|
|
|
|
|
This is especially important in webchat, like converse.js, where each browser
|
|
|
|
tab serves as a separate IM client.
|
|
|
|
|
|
|
|
Both message_carbons and `forward_messages`_ try to solve the same problem
|
|
|
|
(showing sent messages in all connected chat clients aka resources), but go about it
|
|
|
|
in two different ways.
|
|
|
|
|
|
|
|
Message carbons is the XEP (Jabber protocol extension) specifically drafted to
|
|
|
|
solve this problem, while `forward_messages`_ uses
|
|
|
|
`stanza forwarding <http://www.xmpp.org/extensions/xep-0297.html>`_
|
|
|
|
|
2016-08-21 12:49:54 +02:00
|
|
|
message_storage
|
|
|
|
----------------
|
|
|
|
|
|
|
|
* Default: ``session``
|
|
|
|
|
|
|
|
Valid options: ``session``, ``local``.
|
|
|
|
|
|
|
|
This option determines the type of `browser storage <https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage>`_
|
|
|
|
(``localStorage`` or ``sessionStorage``) used by converse.js to cache messages (private and group).
|
|
|
|
|
|
|
|
The main difference between the two is that `sessionStorage` only persists while
|
|
|
|
the current tab or window containing a converse.js instance is open. As soon as
|
|
|
|
it's closed, the data is cleared.
|
|
|
|
|
|
|
|
Data in `localStorage` on the other hand is kept indefinitely, which can have
|
|
|
|
privacy implications on public computers or when multiple people are using the
|
|
|
|
same computer.
|
|
|
|
|
|
|
|
See also the `storage`_ option, which applies to other cached data, such as
|
|
|
|
which chats you have open, what features the XMPP server supports and what
|
|
|
|
your online status is.
|
|
|
|
|
2016-12-07 14:48:47 +01:00
|
|
|
muc_disable_moderator_commands
|
|
|
|
------------------------------
|
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
Allows you to disable the moderator commands such as ``/kick`` or ``/ban``.
|
|
|
|
|
2016-10-26 15:21:36 +02:00
|
|
|
muc_domain
|
|
|
|
----------
|
|
|
|
|
|
|
|
* Default: ``undefined``
|
|
|
|
|
|
|
|
The MUC (multi-user chat) domain that should be used. By default converse.js
|
|
|
|
will attempt to get the MUC domain from the XMPP host of the currently logged in
|
|
|
|
user.
|
|
|
|
|
|
|
|
This setting will override that. You might want to combine this setting with `hide_muc_server`_.
|
|
|
|
|
2015-07-21 11:35:39 +02:00
|
|
|
muc_history_max_stanzas
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
* Default: ``undefined``
|
|
|
|
|
|
|
|
This option allows you to specify the maximum amount of messages to be shown in a
|
2018-02-09 11:55:53 +01:00
|
|
|
chatroom when you enter it. By default, the amount specified in the room
|
2015-07-21 11:35:39 +02:00
|
|
|
configuration or determined by the server will be returned.
|
|
|
|
|
|
|
|
Please note, this option is not related to
|
|
|
|
`XEP-0313 Message Archive Management <https://xmpp.org/extensions/xep-0313.html>`_,
|
2018-02-09 11:55:53 +01:00
|
|
|
which also allows you to show archived chatroom messages, but follows a
|
2015-07-21 11:35:39 +02:00
|
|
|
different approach.
|
|
|
|
|
2018-02-09 11:55:53 +01:00
|
|
|
If you're using MAM for archiving chatroom messages, you might want to set
|
2015-07-21 11:35:39 +02:00
|
|
|
this option to zero.
|
|
|
|
|
2016-08-11 18:03:02 +02:00
|
|
|
muc_instant_rooms
|
|
|
|
------------------
|
|
|
|
|
|
|
|
* Default: ``true``
|
|
|
|
|
|
|
|
Determines whether 'instant' (also called 'dynamic' in OpenFire) rooms are created.
|
|
|
|
Otherwise rooms first have to be configured before they're available to other
|
|
|
|
users (so-called "registered rooms" in `MUC-0045 <http://xmpp.org/extensions/xep-0045.html#createroom>`_).
|
|
|
|
|
|
|
|
From a UX perspective, if this settings is `false`, then a configuration form will
|
|
|
|
render, that has to be filled in first, before the room can be joined by other
|
|
|
|
users.
|
|
|
|
|
2016-08-11 14:00:52 +02:00
|
|
|
muc_nickname_from_jid
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
When set to ``true``, then users will not be prompted to provide nicknames for
|
2018-02-09 11:55:53 +01:00
|
|
|
chatrooms. Instead, the node part of a user's JID (i.e. JID = node@domain/resource)
|
2016-08-11 14:00:52 +02:00
|
|
|
will be used. If the user's nickname is already taken by another user in the
|
2018-02-09 11:55:53 +01:00
|
|
|
chatroom, then an integer will be added to make it unique.
|
2016-08-11 14:00:52 +02:00
|
|
|
|
|
|
|
So, for example, if john@example.com joins a chatroom, his nickname will
|
|
|
|
automatically be "john". If now john@differentdomain.com tries to join the
|
|
|
|
room, his nickname will be "john-2", and if john@somethingelse.com joins, then
|
|
|
|
his nickname will be "john-3", and so forth.
|
|
|
|
|
2017-02-24 11:54:54 +01:00
|
|
|
muc_show_join_leave
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
* Default; ``true``
|
|
|
|
|
2018-02-09 11:55:53 +01:00
|
|
|
Determines whether Converse.js will show info messages inside a chatroom
|
2017-02-24 11:54:54 +01:00
|
|
|
whenever a user joins or leaves it.
|
|
|
|
|
2016-06-16 10:56:32 +02:00
|
|
|
notify_all_room_messages
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
By default, sound and desktop notifications will only be made when you are
|
|
|
|
mentioned in a room. If you set this setting to `true`, then you will be
|
|
|
|
notified of all messages received in a room.
|
|
|
|
|
|
|
|
You can also pass an array of room JIDs to this option, to only apply it to
|
|
|
|
certain rooms.
|
|
|
|
|
2016-03-01 09:58:36 +01:00
|
|
|
notification_icon
|
|
|
|
-----------------
|
|
|
|
|
|
|
|
* Default: ``'/logo/conversejs.png'``
|
|
|
|
|
|
|
|
This option specifies which icon is shown in HTML5 notifications, as provided
|
|
|
|
by the ``src/converse-notification.js`` plugin.
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2015-05-27 18:14:58 +02:00
|
|
|
ping_interval
|
|
|
|
-------------
|
|
|
|
|
2016-03-23 15:43:18 +01:00
|
|
|
* Default: ``180``
|
2015-05-27 18:14:58 +02:00
|
|
|
|
|
|
|
Make ping to server in order to keep connection with server killing sessions after idle timeout.
|
|
|
|
The ping are sent only if no messages are sent in the last ``ping_interval`` seconds
|
|
|
|
You need to set the value to any positive value to enable this functionality.
|
|
|
|
|
|
|
|
If you set this value to ``0`` or any negative value, il will disable this functionality.
|
|
|
|
|
2016-01-15 10:31:36 +01:00
|
|
|
.. _`play-sounds`:
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
play_sounds
|
|
|
|
-----------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``false``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
Plays a notification sound when you receive a personal message or when your
|
2018-02-09 11:55:53 +01:00
|
|
|
nickname is mentioned in a chatroom.
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2015-04-25 22:40:55 +02:00
|
|
|
Inside the ``./sounds`` directory of the Converse.js repo you'll see MP3 and Ogg
|
2014-12-07 00:53:17 +01:00
|
|
|
formatted sound files. We need both, because neither format is supported by all browsers.
|
|
|
|
|
2015-04-25 22:40:55 +02:00
|
|
|
You can set the URL where the sound files are hosted with the `sounds_path`_
|
|
|
|
option.
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2016-03-01 10:43:44 +01:00
|
|
|
Requires the `src/converse-notification.js` plugin.
|
|
|
|
|
2015-06-16 00:18:15 +02:00
|
|
|
.. _`prebind_url`:
|
2015-03-05 23:11:07 +01:00
|
|
|
|
|
|
|
prebind_url
|
|
|
|
-----------
|
|
|
|
|
|
|
|
* Default: ``null``
|
|
|
|
* Type: URL
|
|
|
|
|
|
|
|
See also: :ref:`session-support`
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
This setting should be used in conjunction with ``authentication`` set to `prebind` and :ref:`keepalive` set to ``true``.
|
2015-03-05 23:11:07 +01:00
|
|
|
|
|
|
|
It allows you to specify a URL which converse.js will call when it needs to get
|
|
|
|
the RID and SID (Request ID and Session ID) tokens of a BOSH connection, which
|
|
|
|
converse.js will then attach to.
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2015-03-05 23:11:07 +01:00
|
|
|
The server behind ``prebind_url`` should return a JSON encoded object with the
|
|
|
|
three tokens::
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2015-03-05 23:11:07 +01:00
|
|
|
{
|
|
|
|
"jid": "me@example.com/resource",
|
|
|
|
"sid": "346234623462",
|
|
|
|
"rid": "876987608760"
|
|
|
|
}
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2017-02-22 22:13:23 +01:00
|
|
|
priority
|
|
|
|
--------
|
|
|
|
|
|
|
|
* Default: ``0``
|
|
|
|
* Type: Number
|
|
|
|
|
|
|
|
Determines the priority used for presence stanzas sent out from this resource
|
|
|
|
(i.e. this instance of Converse.js).
|
|
|
|
|
|
|
|
The priority of a given XMPP chat client determines the importance of its presence
|
|
|
|
stanzas in relation to stanzas received from other clients of the same user.
|
|
|
|
|
|
|
|
In Converse.js, the indicated chat status of a roster contact will be taken from the
|
|
|
|
presence stanza (and associated resource) with the highest priority.
|
|
|
|
|
|
|
|
If multiple resources have the same top priority, then the chat status will be
|
|
|
|
taken from the most recent present stanza.
|
|
|
|
|
|
|
|
For more info you can read `Section 2.2.2.3 of RFC-3921 <https://xmpp.org/rfcs/rfc3921.html#rfc.section.2.2.2.3>`_.
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
providers_link
|
|
|
|
--------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``https://xmpp.net/directory.php``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
The hyperlink on the registration form which points to a directory of public
|
|
|
|
XMPP servers.
|
|
|
|
|
2018-02-09 16:02:56 +01:00
|
|
|
root
|
|
|
|
----
|
|
|
|
|
|
|
|
* Default: ``window.document``
|
|
|
|
|
|
|
|
When using converse.js inside a web component's shadow DOM, you will need to set this settings'
|
|
|
|
value to the shadow-root of the shadow DOM.
|
|
|
|
|
|
|
|
For example:
|
|
|
|
|
|
|
|
.. code-block:: javascript
|
|
|
|
|
|
|
|
class CustomChatComponent extends HTMLElement {
|
|
|
|
constructor() {
|
|
|
|
super();
|
|
|
|
const shadowRoot = this.attachShadow({mode: "open"});
|
|
|
|
this.initConverse(shadowRoot);
|
|
|
|
}
|
|
|
|
|
|
|
|
initConverse(shadowRoot) {
|
|
|
|
window.addEventListener("converse-loaded", function(event) {
|
|
|
|
converse.initialize({
|
|
|
|
root: shadowRoot,
|
|
|
|
// Other settings go here...
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
roster_groups
|
|
|
|
-------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``false``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
If set to ``true``, converse.js will show any roster groups you might have
|
|
|
|
configured.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
It's currently not possible to use converse.js to assign contacts to groups.
|
|
|
|
Converse.js can only show users and groups that were previously configured
|
|
|
|
elsewhere.
|
|
|
|
|
2017-02-14 14:00:45 +01:00
|
|
|
show_chatstate_notifications
|
|
|
|
----------------------------
|
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
Specifies whether chat state (online, dnd, away) HTML5 desktop notifications should be shown.
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
show_controlbox_by_default
|
|
|
|
--------------------------
|
|
|
|
|
2017-06-13 21:40:06 +02:00
|
|
|
* Default: ``false`` (``true`` for inVerse)
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
The "controlbox" refers to the special chatbox containing your contacts roster,
|
|
|
|
status widget, chatrooms and other controls.
|
|
|
|
|
|
|
|
By default this box is hidden and can be toggled by clicking on any element in
|
|
|
|
the page with class *toggle-controlbox*.
|
|
|
|
|
|
|
|
If this options is set to true, the controlbox will by default be shown upon
|
|
|
|
page load.
|
|
|
|
|
2015-10-29 15:49:58 +01:00
|
|
|
However, be aware that even if this value is set to ``false``, if the
|
|
|
|
controlbox is open, and the page is reloaded, then it will stay open on the new
|
|
|
|
page as well.
|
|
|
|
|
2016-03-01 10:43:44 +01:00
|
|
|
.. _`show-desktop-notifications`:
|
|
|
|
|
|
|
|
show_desktop_notifications
|
|
|
|
--------------------------
|
|
|
|
|
|
|
|
* Default: ``true``
|
|
|
|
|
2016-03-08 12:01:23 +01:00
|
|
|
Should HTML5 desktop notifications be shown?
|
|
|
|
|
|
|
|
Notification will be shown in the following cases:
|
|
|
|
|
|
|
|
* the browser is not visible nor focused and a private message is received.
|
|
|
|
* the browser is not visible nor focused and a groupchat message is received which mentions you.
|
|
|
|
* `auto_subscribe` is set to `false` and a new contact request is received.
|
2016-03-01 10:43:44 +01:00
|
|
|
|
|
|
|
Requires the `src/converse-notification.js` plugin.
|
|
|
|
|
2017-07-15 19:17:15 +02:00
|
|
|
use_emojione
|
|
|
|
------------
|
|
|
|
* Default: ``true``
|
2017-06-16 11:31:57 +02:00
|
|
|
|
|
|
|
Determines whether `Emojione <https://www.emojione.com/>`_ should be used to
|
2017-07-15 19:17:15 +02:00
|
|
|
render emojis. If set to ``false``, then rendering support will fall back to
|
|
|
|
the operating system or browser (which might not support emoji).
|
2017-06-16 11:31:57 +02:00
|
|
|
|
2017-07-16 12:27:21 +02:00
|
|
|
See also `emojione_image_path`_.
|
|
|
|
|
|
|
|
|
2018-01-18 11:41:47 +01:00
|
|
|
show_message_load_animation
|
|
|
|
---------------------------
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
Determines whether a CSS3 background-color fade-out animation is shown when messages
|
|
|
|
appear in chats.
|
|
|
|
|
|
|
|
Set to ``false`` by default since this option causes performance issues on Firefox.
|
|
|
|
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
show_only_online_users
|
|
|
|
----------------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``false``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
If set to ``true``, only online users will be shown in the contacts roster.
|
|
|
|
Users with any other status (e.g. away, busy etc.) will not be shown.
|
|
|
|
|
2017-03-30 12:40:17 +02:00
|
|
|
show_send_button
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
If set to ``true``, a button will be visible which can be clicked to send a message.
|
|
|
|
|
2015-04-25 22:40:55 +02:00
|
|
|
sounds_path
|
|
|
|
-----------
|
|
|
|
|
|
|
|
* Default: ``/sounds/``
|
|
|
|
|
|
|
|
This option only makes sense in conjunction with the `play_sounds`_ option and
|
|
|
|
specifies the URL of the sound files to be played (exluding the file names
|
|
|
|
themselves).
|
|
|
|
|
|
|
|
In order to support all browsers we need both an MP3 and an Ogg file. Make sure
|
|
|
|
to name your files ``msg_received.ogg`` and ``msg_received.mp3``.
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
storage
|
|
|
|
-------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``session``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
Valid options: ``session``, ``local``.
|
|
|
|
|
2016-08-21 12:49:54 +02:00
|
|
|
This option determines the type of `browser storage <https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage>`_
|
2014-12-07 00:53:17 +01:00
|
|
|
(``localStorage`` or ``sessionStorage``) used by converse.js to cache user data.
|
|
|
|
|
2016-08-21 12:49:54 +02:00
|
|
|
Originally converse.js used only `localStorage`, however `sessionStorage` is from a
|
2014-12-07 00:53:17 +01:00
|
|
|
privacy perspective a better choice.
|
|
|
|
|
2016-08-21 12:49:54 +02:00
|
|
|
The main difference between the two is that `sessionStorage` only persists while
|
2014-12-07 00:53:17 +01:00
|
|
|
the current tab or window containing a converse.js instance is open. As soon as
|
|
|
|
it's closed, the data is cleared.
|
|
|
|
|
2016-08-21 12:49:54 +02:00
|
|
|
Data in `localStorage` on the other hand is kept indefinitely.
|
|
|
|
|
|
|
|
The data that is cached includes which chats you had open, what features the
|
|
|
|
XMPP server supports and what your online status was.
|
|
|
|
|
|
|
|
Since version 1.0.7, the store for messages is now configurable separately with
|
|
|
|
the `message_storage`_ option, to allow you to cache messages for longer in the
|
|
|
|
browser (with `localStorage`) while still using `sessionStorage` for other
|
|
|
|
data.
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
.. note::
|
2016-08-21 12:49:54 +02:00
|
|
|
Between versions 0.8.0 and 1.0.7, setting the value of this option to "local"
|
|
|
|
is not recommended. The statuses (online, away, busy etc.) of your roster
|
|
|
|
contacts are cached in the browser storage. If you use local storage, these
|
|
|
|
values are stored for multiple sessions, and they will likely become out of
|
|
|
|
sync with your contacts' actual statuses. The session storage doesn't have
|
|
|
|
this problem, because roster contact statuses will not become out of sync in
|
|
|
|
a single session, only across more than one session.
|
|
|
|
|
|
|
|
Since version 1.0.7, the "storage" option doesn't apply anymore to how roster
|
|
|
|
contacts and their statuses are stored (they're now always stored in session
|
|
|
|
storage), to address the above issue.
|
2017-03-03 16:16:41 +01:00
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2016-03-31 11:16:21 +02:00
|
|
|
sticky_controlbox
|
|
|
|
-----------------
|
|
|
|
|
2017-06-13 21:40:06 +02:00
|
|
|
* Default: ``false`` (``true`` for inVerse).
|
2016-03-31 11:16:21 +02:00
|
|
|
|
|
|
|
If set to ``true``, the control box (which includes the login, registration,
|
|
|
|
contacts and rooms tabs) will not be closeable. It won't have a close button at
|
|
|
|
all.
|
|
|
|
|
|
|
|
The idea behind this setting is to provide a better experience on mobile
|
|
|
|
devices when the intent is to use converse.js as a web app. In this case
|
|
|
|
it doesn't make sense to close the control box, as there's often then nothing
|
|
|
|
"behind" it that's relevant to the user.
|
|
|
|
|
2017-03-08 12:15:19 +01:00
|
|
|
.. _`strict_plugin_dependencies`:
|
2016-03-31 11:16:21 +02:00
|
|
|
|
2016-03-14 18:03:48 +01:00
|
|
|
strict_plugin_dependencies
|
|
|
|
--------------------------
|
|
|
|
|
|
|
|
* Default: ``false``
|
|
|
|
|
|
|
|
When set to ``true`` and a plugin tries to override an object which doesn't
|
|
|
|
exist (for example because the plugin which provides that object is not
|
|
|
|
loaded), then an error will be raised.
|
|
|
|
|
|
|
|
Otherwise a message will simply be logged and the override instruction ignored.
|
|
|
|
|
2018-01-10 13:59:45 +01:00
|
|
|
The Converse.js plugins architecture can have an :ref:`dependencies`
|
|
|
|
plugin attribute. This enables you to specify an array of other plugins which
|
|
|
|
this one depends on.
|
|
|
|
Converse.js (more specifically, `pluggable.js <https://jcbrand.github.io/pluggable.js/>`_)
|
|
|
|
will first load these dependencies before executing the plugin's overrides and
|
2017-04-18 19:24:49 +02:00
|
|
|
calling its ``initialize`` method.
|
|
|
|
|
2018-01-10 13:59:45 +01:00
|
|
|
This is especially important if you register event handlers in your plugin for
|
|
|
|
events that fire in other plugins. In this case, you want to specify those
|
|
|
|
other plugins as dependencies.
|
|
|
|
|
|
|
|
If ``strict_plugin_dependencies`` is set to ``false``, an error won't be raised
|
|
|
|
if the optional dependencies aren't found.
|
2016-03-14 18:03:48 +01:00
|
|
|
|
2016-02-18 10:17:00 +01:00
|
|
|
synchronize_availability
|
2017-01-20 10:18:18 +01:00
|
|
|
------------------------
|
2016-02-18 10:17:00 +01:00
|
|
|
|
|
|
|
* Default: ``true``
|
|
|
|
|
|
|
|
Valid options: ``true``, ``false``, ``a resource name``.
|
|
|
|
|
|
|
|
This option lets you synchronize your chat status (`online`, `busy`, `away`) with other chat clients. In other words,
|
|
|
|
if you change your status to `busy` in a different chat client, your status will change to `busy` in converse.js as well.
|
|
|
|
|
|
|
|
If set to ``true``, converse.js will synchronize with all other clients you are logged in with.
|
|
|
|
|
|
|
|
If set to ``false``, this feature is disabled.
|
|
|
|
|
|
|
|
If set to ``a resource name``, converse.js will synchronize only with a client that has that particular resource assigned to it.
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2017-03-12 11:32:38 +01:00
|
|
|
time_format
|
|
|
|
-----------
|
|
|
|
|
2017-03-31 04:01:53 +02:00
|
|
|
* Default: ``HH:mm``
|
2017-03-12 11:32:38 +01:00
|
|
|
|
2017-03-31 04:01:53 +02:00
|
|
|
Examples: ``HH:mm``, ``hh:mm``, ``hh:mm a``.
|
2017-03-12 11:32:38 +01:00
|
|
|
|
|
|
|
This option makes the time format for the time shown, for each message, configurable. Converse uses `moment.js <https://momentjs.com/>`_
|
|
|
|
for showing time. This option allows the configuration of the format in which `moment` will display the time for the messages. For detailed
|
|
|
|
description of time-format options available for `moment` you can check this `link <https://momentjs.com/docs/#/parsing/string-format/>`_.
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
use_otr_by_default
|
|
|
|
------------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``false``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
If set to ``true``, Converse.js will automatically try to initiate an OTR (off-the-record)
|
2018-02-09 11:55:53 +01:00
|
|
|
encrypted chat session every time you open a chatbox.
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
use_vcards
|
|
|
|
----------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``true``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
Determines whether the XMPP server will be queried for roster contacts' VCards
|
|
|
|
or not. VCards contain extra personal information such as your fullname and
|
|
|
|
avatar image.
|
|
|
|
|
|
|
|
visible_toolbar_buttons
|
|
|
|
-----------------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default:
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
.. code-block:: javascript
|
|
|
|
|
|
|
|
{
|
|
|
|
call: false,
|
|
|
|
clear: true,
|
2017-07-15 08:17:41 +02:00
|
|
|
emoji: true,
|
2015-10-31 17:30:06 +01:00
|
|
|
toggle_occupants: true
|
2014-12-07 00:53:17 +01:00
|
|
|
}
|
|
|
|
|
2018-02-09 11:55:53 +01:00
|
|
|
Allows you to show or hide buttons on the chatboxes' toolbars.
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
* *call*:
|
|
|
|
Provides a button with a picture of a telephone on it.
|
2017-02-16 20:29:48 +01:00
|
|
|
When the call button is pressed, it will emit an event that can be used by a third-party library to initiate a call.
|
|
|
|
|
|
|
|
.. code-block:: javascript
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2016-12-19 08:33:46 +01:00
|
|
|
converse.listen.on('callButtonClicked', function(data) {
|
2014-12-07 00:53:17 +01:00
|
|
|
console.log('Strophe connection is', data.connection);
|
|
|
|
console.log('Bare buddy JID is', data.model.get('jid'));
|
|
|
|
// ... Third-party library code ...
|
|
|
|
});
|
|
|
|
* *clear*:
|
2018-02-09 11:55:53 +01:00
|
|
|
Provides a button for clearing messages from a chatbox.
|
2017-07-15 08:17:41 +02:00
|
|
|
* *emoji*:
|
|
|
|
Enables rendering of emoji and provides a toolbar button for choosing them.
|
|
|
|
* *toggle_occupants*:
|
2018-02-09 11:55:53 +01:00
|
|
|
Shows a button for toggling (i.e. showing/hiding) the list of occupants in a chatroom.
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2015-02-08 19:35:58 +01:00
|
|
|
.. _`websocket-url`:
|
|
|
|
|
|
|
|
websocket_url
|
|
|
|
-------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``undefined``
|
2015-02-08 19:35:58 +01:00
|
|
|
|
2016-03-14 18:03:48 +01:00
|
|
|
This option is used to specify a
|
2015-02-08 19:35:58 +01:00
|
|
|
`websocket <https://developer.mozilla.org/en/docs/WebSockets>`_ URI to which
|
|
|
|
converse.js can connect to.
|
|
|
|
|
|
|
|
Websockets provide a more modern and effective two-way communication protocol
|
|
|
|
between the browser and a server, effectively emulating TCP at the application
|
|
|
|
layer and therefore overcoming many of the problems with existing long-polling
|
|
|
|
techniques for bidirectional HTTP (such as `BOSH <https://en.wikipedia.org/wiki/BOSH>`_).
|
|
|
|
|
|
|
|
Please refer to your XMPP server's documentation on how to enable websocket
|
|
|
|
support.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
Please note that not older browsers do not support websockets. For older
|
|
|
|
browsers you'll want to specify a BOSH URL. See the :ref:`bosh-service-url`
|
|
|
|
configuration setting).
|
2016-03-14 18:03:48 +01:00
|
|
|
|
2015-02-08 19:35:58 +01:00
|
|
|
.. note::
|
|
|
|
Converse.js does not yet support "keepalive" with websockets.
|
|
|
|
|
2018-01-09 15:49:45 +01:00
|
|
|
.. _`view_mode`:
|
2017-02-16 20:29:48 +01:00
|
|
|
|
2017-11-02 15:30:24 +01:00
|
|
|
view_mode
|
|
|
|
---------
|
2017-02-16 20:29:48 +01:00
|
|
|
|
2017-11-02 15:30:24 +01:00
|
|
|
* Default: ``overlayed``
|
2018-02-09 16:33:48 +01:00
|
|
|
* Allowed values: ``overlayed``, ``fullscreen``, ``mobile``, ``embedded``
|
2017-02-16 20:29:48 +01:00
|
|
|
|
2017-11-02 15:30:24 +01:00
|
|
|
The ``view_mode`` setting configures converse.js's mode and resulting behavior.
|
2017-02-16 20:29:48 +01:00
|
|
|
|
2017-11-02 15:30:24 +01:00
|
|
|
Before the introduction of this setting (in version 3.3.0), there were there
|
2018-02-09 16:33:48 +01:00
|
|
|
different builds, each for the different modes.
|
2017-02-16 20:29:48 +01:00
|
|
|
|
2017-11-02 15:30:24 +01:00
|
|
|
These were:
|
2017-02-16 20:29:48 +01:00
|
|
|
|
2017-11-02 15:30:24 +01:00
|
|
|
* ``converse-mobile.js`` for the ``mobile`` mode
|
2018-02-09 16:33:48 +01:00
|
|
|
* ``converse-muc-embedded.js`` for embedding a single MUC room into the page.
|
|
|
|
* ``converse.js`` for the ``overlayed`` mode
|
2017-11-02 15:30:24 +01:00
|
|
|
* ``inverse.js`` for the ``fullscreen`` mode
|
2017-02-16 20:29:48 +01:00
|
|
|
|
2018-02-09 16:33:48 +01:00
|
|
|
Besides having different builds, certain plugins had to be whitelisted
|
2017-11-02 15:30:24 +01:00
|
|
|
and blacklisted for the different modes.
|
2017-02-16 20:29:48 +01:00
|
|
|
|
2017-11-02 15:30:24 +01:00
|
|
|
``converse-singleton`` had to be whitelisted for the ``mobile`` and ``fullscreen``
|
|
|
|
modes, additionally ``converse-inverse`` had to be whitelisted for the
|
|
|
|
``fullscreen`` mode.
|
2017-02-16 20:29:48 +01:00
|
|
|
|
2017-11-02 15:30:24 +01:00
|
|
|
For both those modes the ``converse-minimize`` and ``converse-dragresize``
|
|
|
|
plugins had to be blacklisted.
|
|
|
|
|
2018-02-09 16:33:48 +01:00
|
|
|
When using ``converse-muc-embedded.js`` various plugins also had to manually be
|
|
|
|
blacklisted.
|
|
|
|
|
|
|
|
Since version 3.3.0 it's no longer necessary to blacklist any plugins (except
|
|
|
|
for ``converse-muc-embedded.js``, which is from version 3.3.3).
|
|
|
|
|
|
|
|
Blacklisting now happens automatically.
|
|
|
|
|
|
|
|
Since version 3.3.0, the ``inverse.js`` and ``converse-mobile.js`` builds no
|
|
|
|
longer exist. Instead the standard ``converse.js`` build is used, together with
|
|
|
|
the appropriate ``view_mode`` value.
|
|
|
|
|
|
|
|
The ``converse-muc-embedded.js`` build is still kept, because it's smaller than
|
|
|
|
``converse.js`` due to unused code being removed. It doesn't however contain
|
|
|
|
any new code, so the full ``converse.js`` build could be used instead, as long
|
|
|
|
as ``view_mode`` is set to ``embedded``.
|
2017-11-02 15:30:24 +01:00
|
|
|
|
2018-02-09 16:33:48 +01:00
|
|
|
Furthermore, it's no longer necessary to whitelist or blacklist any plugins
|
|
|
|
when switching view modes.
|
2017-11-02 15:30:24 +01:00
|
|
|
|
|
|
|
.. note::
|
|
|
|
Although the ``view_mode`` setting has removed the need for different
|
|
|
|
JavaScript builds, you'll still need to use different CSS files depending
|
|
|
|
on the view mode.
|
|
|
|
|
|
|
|
* For ``overlayed`` this is ``./css/converse.css``
|
|
|
|
* For ``fullscreen`` you need ``./css/inverse.css``
|
|
|
|
* For ``mobile`` you need to use both ``./css/converse.css`` and ``./css/mobile.css``
|
|
|
|
|
|
|
|
Hopefully in a future release the CSS files will be combined and you'll
|
|
|
|
only need ``converse.css``
|
2017-02-16 20:29:48 +01:00
|
|
|
|
|
|
|
|
2017-03-09 15:01:31 +01:00
|
|
|
.. _`whitelisted_plugins`:
|
|
|
|
|
2017-02-16 20:29:48 +01:00
|
|
|
whitelisted_plugins
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
* Default: ``[]``
|
|
|
|
|
|
|
|
A list of plugin names that are whitelisted and will therefore be
|
|
|
|
initialized once ``converse.initialize`` is called.
|
|
|
|
|
|
|
|
From Converse.js 3.0 onwards most of the API is available only to plugins and
|
|
|
|
all plugins need to be whitelisted first.
|
|
|
|
|
|
|
|
This is done to prevent malicious scripts from using the API to trick users or
|
|
|
|
to read their conversations.
|
|
|
|
|
|
|
|
By default all the core plugins are already whitelisted.
|
|
|
|
|
|
|
|
These are::
|
|
|
|
|
|
|
|
converse-bookmarks
|
|
|
|
converse-chatview
|
|
|
|
converse-controlbox
|
|
|
|
converse-core
|
|
|
|
converse-dragresize
|
|
|
|
converse-headline
|
|
|
|
converse-mam
|
|
|
|
converse-minimize
|
|
|
|
converse-muc
|
|
|
|
converse-notification
|
|
|
|
converse-otr
|
|
|
|
converse-ping
|
|
|
|
converse-register
|
|
|
|
converse-rosterview
|
|
|
|
converse-vcard
|
|
|
|
|
2017-03-03 16:16:41 +01:00
|
|
|
If you are using a custom build which excludes some core plugins, then you
|
2017-02-16 20:29:48 +01:00
|
|
|
should blacklist them so that malicious scripts can't register their own
|
|
|
|
plugins under those names. See `blacklisted_plugins`_ for more info.
|
|
|
|
|
|
|
|
An example from `the embedded room demo <https://conversejs.org/demo/embedded.html>`_
|
|
|
|
|
2017-03-03 16:16:41 +01:00
|
|
|
.. code-block:: javascript
|
2017-02-16 20:29:48 +01:00
|
|
|
|
|
|
|
require(['converse-core', 'converse-muc-embedded'], function (converse) {
|
|
|
|
converse.initialize({
|
|
|
|
// other settings removed for brevity
|
|
|
|
whitelisted_plugins: ['converse-muc-embedded']
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
xhr_custom_status
|
|
|
|
-----------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``false``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
.. note::
|
2017-09-03 22:12:17 +02:00
|
|
|
XHR stands for XMLHTTPRequest, and is meant here in the AJAX sense (Asynchronous JavaScript and XML).
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
This option will let converse.js make an AJAX POST with your changed custom chat status to a
|
|
|
|
remote server.
|
|
|
|
|
|
|
|
xhr_custom_status_url
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
.. note::
|
2017-09-03 22:12:17 +02:00
|
|
|
XHR stands for XMLHTTPRequest, and is meant here in the AJAX sense (Asynchronous JavaScript and XML).
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: Empty string
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
Used only in conjunction with ``xhr_custom_status``.
|
|
|
|
|
|
|
|
This is the URL to which the AJAX POST request to set the user's custom status
|
|
|
|
message will be made.
|
|
|
|
|
|
|
|
The message itself is sent in the request under the key ``msg``.
|
|
|
|
|
|
|
|
xhr_user_search
|
|
|
|
---------------
|
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: ``false``
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
.. note::
|
2017-09-03 22:12:17 +02:00
|
|
|
XHR stands for XMLHTTPRequest, and is meant here in the AJAX sense (Asynchronous JavaScript and XML).
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
There are two ways to add users.
|
|
|
|
|
|
|
|
* The user inputs a valid JID (Jabber ID), and the user is added as a pending contact.
|
2018-02-09 11:55:53 +01:00
|
|
|
* The user inputs some text (for example part of a first name or last name),
|
|
|
|
an XHR (Ajax Request) will be made to a remote server, and a list of matches are returned.
|
|
|
|
The user can then choose one of the matches to add as a contact.
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
This setting enables the second mechanism, otherwise by default the first will be used.
|
|
|
|
|
|
|
|
*What is expected from the remote server?*
|
|
|
|
|
|
|
|
A default JSON encoded list of objects must be returned. Each object
|
|
|
|
corresponds to a matched user and needs the keys ``id`` and ``fullname``.
|
|
|
|
|
2017-03-03 16:16:41 +01:00
|
|
|
.. code-block:: javascript
|
2017-02-27 18:41:01 +01:00
|
|
|
|
|
|
|
[{"id": "foo", "fullname": "Foo McFoo"}, {"id": "bar", "fullname": "Bar McBar"}]
|
|
|
|
|
2015-05-15 14:45:08 +02:00
|
|
|
.. note::
|
|
|
|
Make sure your server script sets the header `Content-Type: application/json`.
|
|
|
|
|
2014-12-07 00:53:17 +01:00
|
|
|
xhr_user_search_url
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
.. note::
|
2017-09-03 22:12:17 +02:00
|
|
|
XHR stands for XMLHTTPRequest, and is meant here in the AJAX sense (Asynchronous JavaScript and XML).
|
2014-12-07 00:53:17 +01:00
|
|
|
|
2015-04-02 13:07:59 +02:00
|
|
|
* Default: Empty string
|
2014-12-07 00:53:17 +01:00
|
|
|
|
|
|
|
Used only in conjunction with ``xhr_user_search``.
|
|
|
|
|
2015-04-25 22:22:16 +02:00
|
|
|
This is the URL to which an XHR GET request will be made to fetch user data from your remote server.
|
2014-12-07 00:53:17 +01:00
|
|
|
The query string will be included in the request with ``q`` as its key.
|
|
|
|
|
2015-04-25 22:22:16 +02:00
|
|
|
The data returned must be a JSON encoded list of user JIDs.
|