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
2018-09-24 21:53:54 +02:00
you'll want to configure Converse to suit your needs before you deploy it
2014-12-07 00:53:17 +01:00
on your website.
2018-09-24 21:53:54 +02:00
Converse is passed its configuration settings when you call its *initialize* method.
2014-12-07 00:53:17 +01:00
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.
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
2021-09-09 16:20:33 +02:00
.. _`allowed_audio_domains`:
allowed_audio_domains
---------------------
* Default: `` null ``
If falsy, all domains are allowed. Set it to an array to specify a whitelist of allowed domains.
.. _`allowed_image_domains`:
allowed_image_domains
---------------------
* Default: `` null ``
If falsy, all domains are allowed. Set it to an array to specify a whitelist of allowed domains.
E.g. `` ['imgur.com', 'imgbb.com'] ``
.. _`allowed_video_domains`:
allowed_video_domains
---------------------
* Default: `` null ``
If falsy, all domains are allowed. Set it to an array to specify a whitelist of allowed domains.
E.g. `` ['imgur.com'] ``
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
2018-08-23 09:41:39 +02:00
This option states the way Converse will authenticate.
2015-04-02 13:07:59 +02:00
login
~~~~~
The default means is `` login `` , which means that the user either logs in manually with their
2020-10-20 06:45:35 +02:00
username and password, or automatically if used together with `auto_login`_ set to `` true ``
and `` jid `` and `` password `` values.
2015-04-02 13:07:59 +02:00
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.
2019-06-05 10:01:55 +02:00
.. _`prebind`:
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).
2018-06-06 11:07:59 +02:00
Converse needs these tokens in order to attach to that same session.
2015-04-02 13:07:59 +02:00
2020-10-20 06:45:35 +02:00
In addition to setting `authentication`_ to `` prebind `` , you'll also need to
2019-06-05 10:01:55 +02:00
set the `prebind_url`_ and `bosh-service-url`_ .
2015-04-02 13:07:59 +02:00
2019-06-05 10:01:55 +02:00
Here's an example of Converse being initialized with these options:
2015-04-02 13:07:59 +02:00
.. code-block :: javascript
converse.initialize({
bosh_service_url: 'https://bind.example.com',
jid: 'me@example.com',
authentication: 'prebind',
prebind_url: 'http://example.com/api/prebind',
2020-06-08 19:03:33 +02:00
auto_login: true,
2015-04-02 13:07:59 +02:00
allow_logout: false
});
2020-04-17 13:14:23 +02:00
allow_adhoc_commands
--------------------
* Default: `` true ``
Allows privileged users to run XEP-0050 Ad-Hoc commands via the settings modal.
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
2021-12-10 22:13:01 +01:00
CSS properties set on a chatboxes (specifically on the `` .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
2019-02-25 14:18:05 +01:00
allow_logout
------------
* Default: `` true ``
Determines whether the user is allowed to log out. If set to `` false `` , there will be no logout button.
2019-11-22 12:55:15 +01:00
.. _`allow_message_corrections`:
allow_message_corrections
-------------------------
* Default: `` 'all' ``
* Possible values: `` 'all' `` , `` 'last' ``
Configures the last message correction (LMC) feature of Converse. By default you can edit all of your own
messages. Setting this to `` 'last' `` will limit this feature to the message sent most recently as suggested by
`XEP-0308: Last Message Correction <https://xmpp.org/extensions/xep-0308.html> `_ .
Setting it to anything else (including `` false `` ) will disable the ability to correct sent messages.
allow_message_retraction
------------------------
* Default: `` 'all' ``
2020-03-26 10:35:08 +01:00
* Possible values: `` 'all' `` , `` 'own' `` , `` 'moderator' `` or any falsy value
2019-11-22 12:55:15 +01:00
Determines who is allowed to retract messages. If set to `` 'all' `` , then normal
users may retract their own messages and `` 'moderators' `` may retract the messages of
other users.
2020-10-16 09:02:12 +02:00
allow_message_styling
---------------------
* Default: `` true ``
* Possible values: `` true `` , `` false ``
Determines wehether support for XEP-0393 Message Styling hints are enabled or not.
2019-11-22 12:55:15 +01: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).
2019-06-05 10:01:55 +02:00
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
2017-02-01 10:14:36 +01:00
roster can't contact you unless one (or both) of you subscribe to one another's
presence (i.e. adding as a roster contact).
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> `_ .
2018-06-06 11:07:59 +02:00
Even though Converse asks for the bookmarks to be kept private (via the
2018-02-08 15:39:27 +01:00
`<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.
2019-06-14 11:54:01 +02:00
If your XMPP server does not support `XEP-0223` 's `` #publish-options ``
2018-02-08 15:39:27 +01:00
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
2019-03-04 17:49:44 +01:00
Support for `XEP-0077: In band registration <https://xmpp.org/extensions/xep-0077.html> `_
2015-01-05 18:08:40 +01:00
Allow XMPP account registration showing the corresponding UI register form interface.
2021-04-14 22:56:59 +02:00
allow_url_history_change
------------------------
* Default: `` true ``
Allow Converse to change the browser url bar through the History API <https://developer.mozilla.org/en-US/docs/Web/API/History_API>.
2020-10-20 06:45:35 +02:00
allow_user_trust_override
-------------------------
* Default: `` true ``
* Allowed values: `` true `` , `` false `` , `` off ``
This setting determines whether a user may decide whether
Converse is `` trusted `` or not (e.g. in the particular browser).
This is done via a *This is a trusted device* checkbox in the login form.
If this setting is set to `` true `` or `` off `` , the checkbox will be shown to the user, otherwise not.
When this setting is set to `` true `` , the checkbox will be checked by default.
To not have it checked by default, set this setting to `` off `` .
If the user indicates that this device/browser is not trusted, then effectively
it's the same as setting `clear_cache_on_logout`_ to `` true ``
and `persistent_store`_ to `` sessionStorage `` .
`` sessionStorage `` only persists while the current tab or window containing a Converse instance is open.
As soon as it's closed, the data is cleared.
The data that is cached (or cleared) includes your sent and received messages, which chats you had
open, what features the XMPP server supports and what your online status was.
Clearing the cache makes Converse much slower when the user logs in again, because all data needs to be fetch anew.
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).
2021-06-16 19:25:52 +02:00
2019-03-28 14:34:12 +01:00
autocomplete_add_contact
------------------------
* Default: `` true ``
Determines whether search suggestions are shown in the "Add Contact" modal.
2019-06-18 14:04:26 +02:00
auto_focus
----------
* Default: `` true ``
If set to `` true `` , the textarea for composing chat messages will automatically
become focused as soon as a chat is opened. This means you don't need to click
2019-12-29 14:47:25 +01:00
the textarea first before starting to type a message. This also applies to the
username field which is automatically focused after the login controlbox is
loaded.
2019-06-18 14:04:26 +02:00
For applications where chat is not the main feature, automatic focus of the
chat box might be undesired.
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
2019-02-26 10:34:41 +01:00
multi-user chat, then a list of rooms on that server will be fetched in the
"Query for Groupchats" modal.
2014-12-07 00:53:17 +01:00
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.
2019-02-26 10:34:41 +01:00
If the `muc_domain`_ is locked with the `locked_muc_domain`_ setting, then
rooms will automatically be fetched in the "Query for Groupchats" modal,
regardless of the value of this setting.
2017-09-13 11:14:58 +02:00
.. _`auto_login`:
2015-04-02 13:07:59 +02:00
auto_login
----------
* Default: `` false ``
2018-08-23 09:41:39 +02:00
This option can be used to let Converse automatically log the user in as
2015-04-02 13:07:59 +02:00
soon as the page loads.
2020-10-20 06:45:35 +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
2020-10-20 06:45:35 +02:00
better reconnection with `auto_reconnect`_ . When the connection drops,
2018-08-23 09:41:39 +02:00
Converse will automatically fetch new login credentials from the
2017-05-03 09:16:01 +02:00
`` credentials_url `` and reconnect.
2015-04-02 13:07:59 +02:00
2020-10-20 06:45:35 +02:00
If `authentication`_ is set to `` anonymous `` , then you will also need to provide the
2016-05-17 18:04:01 +02:00
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
2018-08-23 09:41:39 +02:00
`` password `` ) to `` converse.initialize `` to start Converse and log the user
2019-07-29 16:17:06 +02:00
in to their XMPP account.
.. note ::
2019-11-22 12:57:51 +01:00
The interaction between `` keepalive `` and `` auto_login `` is unfortunately
2020-10-20 06:45:35 +02:00
inconsistent depending on the `authentication`_ method used.
2019-07-29 16:17:06 +02:00
2020-10-20 06:45:35 +02:00
If `` auto_login `` is set to `` false `` and `authentication`_ is set to
2019-11-22 12:57:51 +01:00
`` anonymous `` , `` external `` or `` prebind `` , then Converse won't automatically
log the user in.
2019-07-29 16:17:06 +02:00
2020-10-20 06:45:35 +02:00
If `authentication`_ set to `` login `` the situation is much more
2019-11-22 12:57:51 +01:00
ambiguous, since we don't have a way to distinguish between wether we're
restoring a previous session (`` keepalive `` ) or whether we're
automatically setting up a new session (`` auto_login `` ).
2019-07-29 16:17:06 +02:00
2019-11-22 12:57:51 +01:00
So currently if EITHER `` keepalive `` or `` auto_login `` is `` true `` and
2020-10-20 06:45:35 +02:00
`authentication`_ is set to `` login `` , then Converse will try to log the user in.
2019-07-29 16:17:06 +02:00
2016-01-15 07:18:22 +01:00
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.
2020-10-20 06:45:35 +02:00
This option works best when you have `authentication`_ set to `` prebind `` and have
2019-06-05 10:01:55 +02:00
also specified a `` prebind_url `` URL, from where Converse can fetch the BOSH
2018-08-23 09:41:39 +02:00
tokens. In this case, Converse will automaticallly reconnect when the
2016-08-19 16:11:37 +02:00
connection drops but also reestablish earlier lost connections (due to
network outages, closing your laptop etc.).
2020-10-20 06:45:35 +02:00
When `authentication`_ is set to `login` , then this option will only work when
2016-08-19 16:11:37 +02:00
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
2018-08-23 09:41:39 +02:00
Converse in desktop apps, for example those based on `CEF <https://bitbucket.org/chromiumembedded/cef> `_
2016-08-19 16:11:37 +02:00
or `electron <http://electron.atom.io/> `_ .
2018-09-04 11:39:27 +02:00
auto_register_muc_nickname
--------------------------
* Default: `` false ``
2021-06-02 18:34:11 +02:00
* Allowed values: `` false `` , `` true `` , `` 'unregister' ``
2018-09-04 11:39:27 +02:00
2021-06-02 18:34:11 +02:00
If truthy, Converse will automatically register a user's nickname upon entering
a groupchat.
2018-09-04 11:39:27 +02:00
See here fore more details: https://xmpp.org/extensions/xep-0045.html#register
2021-06-02 18:34:11 +02:00
If set to `` 'unregister' `` , then the user's nickname will be registered
(because it's a truthy value) and also be unregistered when the user
permanently leaves the MUC by closing it.
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.
2019-03-18 18:53:38 +01:00
Also inviting users won't be prompted for a reason.
2015-12-02 11:14:17 +01:00
2016-03-22 09:15:52 +01:00
2018-05-02 17:07:57 +02:00
auto_join_private_chats
-----------------------
* Default: `` [] ``
Allows you to provide a list of user JIDs for private (i.e. single) chats that
should automatically be started upon login.
For example::
`['tom@example.org', 'dick@example.org', 'harry@example.org']`
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
2019-07-22 15:10:54 +02:00
specifies the room's JID and other options.
2016-03-22 09:15:52 +01:00
2017-02-16 20:29:48 +01:00
For example::
2016-03-22 09:15:52 +01:00
2019-07-22 15:10:54 +02:00
`[{'jid': 'room@example.org', 'nick': 'WizardKing69', 'minimized': true }]`
2016-03-22 09:15:52 +01:00
2017-11-02 15:30:24 +01:00
blacklisted_plugins
-------------------
2018-05-24 14:37:52 +02:00
* Default: `` [] ``
2017-11-02 15:30:24 +01:00
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.
2018-06-06 11:07:59 +02:00
From Converse 3.0 onwards most of the API is available only to plugins and
2017-11-02 15:30:24 +01:00
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::
2019-06-05 10:01:55 +02:00
converse-bosh
2017-11-02 15:30:24 +01:00
converse-bookmarks
2018-03-15 21:22:32 +01:00
converse-chatboxes
2017-11-02 15:30:24 +01:00
converse-chatview
converse-controlbox
converse-core
2018-03-15 21:22:32 +01:00
converse-disco
2017-11-02 15:30:24 +01:00
converse-dragresize
2018-03-15 21:22:32 +01:00
converse-fullscreen
2017-11-02 15:30:24 +01:00
converse-headline
converse-mam
converse-minimize
converse-muc
2018-03-15 21:22:32 +01:00
converse-muc-embedded
2017-11-02 15:30:24 +01:00
converse-notification
converse-ping
2018-03-15 21:22:32 +01:00
converse-profile
2017-11-02 15:30:24 +01:00
converse-register
2018-03-15 21:22:32 +01:00
converse-roomslist
2017-11-02 15:30:24 +01:00
converse-rosterview
2018-03-15 21:22:32 +01:00
converse-singleton
2019-06-05 10:01:55 +02:00
converse-smacks
2018-03-15 21:22:32 +01:00
converse-spoilers
2019-06-05 10:01:55 +02:00
converse-vcard
2017-11-02 15:30:24 +01:00
2018-03-15 21:22:32 +01:00
Example:
2017-11-02 15:30:24 +01:00
.. code-block :: javascript
require(['converse-core', 'converse-muc-embedded'], function (converse) {
converse.initialize({
// other settings removed for brevity
blacklisted_plugins: [
'converse-dragresize',
2018-03-15 21:22:32 +01:00
'converse-minimize'
2017-11-02 15:30:24 +01:00
],
});
});
2014-12-07 00:53:17 +01:00
.. _`bosh-service-url`:
2019-07-26 13:32:21 +02:00
2014-12-07 00:53:17 +01:00
bosh_service_url
----------------
2015-04-02 13:07:59 +02:00
* Default: `` undefined ``
2014-12-07 00:53:17 +01:00
2019-11-22 00:11:26 +01:00
Example: `` http://xmpp.example.com:5280/bosh/ ``
Example with reverse-proxy and TLS: `` https://xmpp.example.com/bosh/ ``
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.
2019-07-03 11:55:42 +02:00
2020-10-20 06:45:35 +02:00
clear_cache_on_logout
---------------------
* Default: `` false ``
If set to `` true `` , all locally cached data will be cleared when the user logs out,
regardless of the `persistent_store`_ being used (`` localStorage `` , `` IndexedDB `` or `` sessionStorage `` ).
*Note* : If `allow_user_trust_override`_ is set to `` true `` and the user
indicates that this device/browser is **not** trusted, then the cache will be
cleared on logout, even if this setting is set to `` true `` .
*Note* : If this setting is set to `` true `` , then OMEMO will be disabled, since
otherwise it won't be possible to decrypt archived messages that were
already decrypted previously (due to forward security).
2019-07-03 11:55:42 +02:00
clear_messages_on_reconnection
------------------------------
* Default: `` false ``
In some cases, it might be desirable to clear cached chat messages once you've
reconnected to the XMPP server.
For example, if you want to prevent the chat history from getting too long or
if you want to avoid gaps in the chat history (for example due to MAM not
returning all messages since the last cached message).
Beware, if you're using OMEMO, then you probably don't want to set this setting to
`` true `` . OMEMO messages can be decrypted only once, so if they then
subsequently get cleared, you won't get the plaintext back.
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
2018-06-06 11:07:59 +02:00
Converse relies on `Strophe.js <http://strophe.im> `_ to establish and
2016-10-12 13:55:47 +02:00
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> `_ .
2020-06-03 17:59:41 +02:00
Restricting the supported authentication mechanisms:
***** ***** ***** ***** ***** ***** ***** ***** ***** ***** **
2016-10-12 13:55:47 +02:00
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,
]
2020-06-03 17:59:41 +02:00
}
2016-10-12 13:55:47 +02:00
});
2020-06-03 17:59:41 +02:00
Running the XMPP Connection inside a shared worker
***** ***** ***** ***** ***** ***** ***** ***** ***** *****
Newer versions of Strophe.js, support the ability to run the XMPP Connection
inside a `shared worker <https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker> `_ that's shared
between open tabs in the browser in which Converse is running (and which have the same domain).
*Note:* This feature is experimental and there currently is no way to
synchronize actions between tabs. For example, sent 1-on-1 messages aren't
reflected by the server, so you if you send such a message in one tab, it won't
appear in another.
.. code-block :: javascript
converse.initialize({
connection_options: { 'worker': true }
});
2017-03-03 16:16:41 +01:00
.. _`credentials_url`:
2016-03-31 10:37:28 +02:00
credentials_url
---------------
* Default: `` null ``
* Type: URL
2020-10-20 06:45:35 +02:00
This setting should be used in conjunction with `authentication`_ set to `` login `` .
2016-03-31 10:37:28 +02:00
2018-08-23 09:41:39 +02:00
It allows you to specify a URL which Converse will call when it needs to get
the username and password (or authentication token) which Converse will use
2016-03-31 10:37:28 +02:00
to automatically log the user in.
2020-10-20 06:45:35 +02:00
If `auto_reconnect`_ is also set to `` true `` , then Converse will automatically
2017-05-03 09:16:01 +02:00
fetch new credentials from the `` credentials_url `` whenever the connection or
session drops, and then attempt to reconnect and establish a new session.
2019-04-29 17:29:07 +02:00
If the request to the `` credentials_url `` URL fails for whatever reason,
Converse will continuously retry to fetch the credentials every 2 seconds.
2016-03-31 10:37:28 +02:00
The server behind `` credentials_url `` should return a JSON encoded object::
{
"jid": "me@example.com/resource",
2019-01-25 17:57:04 +01:00
"password": "Ilikecats!"
2016-03-31 10:37:28 +02:00
}
2015-06-22 00:01:31 +02:00
csi_waiting_time
----------------
* Default: `` 0 ``
2019-03-04 17:49:44 +01:00
This option adds support for `XEP-0352 Client State Indication <https://xmpp.org/extensions/xep-0352.html>_`
2015-06-22 00:01:31 +02:00
2018-08-23 09:41:39 +02:00
If Converse is idle for the configured amount of seconds, a chat state
2015-06-22 00:01:31 +02:00
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.
2019-11-22 14:23:19 +01:00
.. _`loglevel`:
2019-04-16 14:38:38 +02:00
2019-11-22 14:23:19 +01:00
loglevel
--------
2014-12-07 00:53:17 +01:00
2019-11-22 14:23:19 +01:00
* Default: `` 'info' ``
* Allowed values: `` 'debug' `` , `` 'info' `` , `` 'warn' `` , `` 'error' `` , `` 'fatal' ``
2019-02-27 16:02:55 +01:00
2019-11-22 14:23:19 +01:00
You can also set this value by changing a URL fragment `#converse?loglevel=debug`
2019-02-27 16:02:55 +01:00
2022-01-28 20:54:55 +01:00
dark_theme
----------
* Default: `` 'dracula' ``
The theme being used in dark mode.
2014-12-07 00:53:17 +01:00
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.
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
2018-08-23 09:41:39 +02:00
`` 'chat' `` , then Converse will send out a presence stanza with `` "show" ``
2016-05-31 10:03:06 +02:00
set to `` 'chat' `` as soon as you've been logged in.
2018-11-18 19:14:22 +01:00
discover_connection_methods
---------------------------
2020-04-10 15:21:13 +02:00
* Default: `` true ``
2018-11-18 19:14:22 +01:00
Use `XEP-0156 <https://xmpp.org/extensions/xep-0156.html> `_ to discover whether
the XMPP host for the current user advertises any Websocket or BOSH connection
URLs that can be used.
If this is set to `` false `` , then a `websocket_url`_ or `bosh_service_url`_ need to be
set.
Currently only the XML encoded host-meta resource is supported as shown in
`Example 2 under section 3.3 <https://xmpp.org/extensions/xep-0156.html#httpexamples> `_ .
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
2019-10-16 17:17:29 +02:00
emoji_categories
----------------
2019-11-22 12:57:51 +01:00
* Default:
::
{
"smileys": ":grinning:",
"people": ":thumbsup:",
"activity": ":soccer:",
"travel": ":motorcycle:",
"objects": ":bomb:",
"nature": ":rainbow:",
"food": ":hotdog:",
"symbols": ":musical_note:",
"flags": ":flag_ac:",
"custom": ":converse:"
}
2019-10-16 17:17:29 +02:00
This setting lets you define the categories that are available in the emoji
picker, as well as the default image that's shown for each category.
The keys of the map are the categories and the values are the shortnames of the
representative images.
If you want to remove a category, don't just remove the key, instead set its
value to `` undefined `` .
Due to restrictions intended to prevent addition of undeclared configuration
settings, it's not possible to add new emoji categories. There is however a
`` custom `` category where you can put your own custom emojis (also known as
"stickers").
To add custom emojis, you need to edit `` src/headless/emojis.json `` to add new
entries to the map under the `` custom `` key.
emoji_categories_label
----------------------
2019-11-22 12:57:51 +01:00
* Default:
::
{
"smileys": "Smileys and emotions",
"people": "People",
"activity": "Activities",
"travel": "Travel",
"objects": "Objects",
"nature": "Animals and nature",
"food": "Food and drink",
"symbols": "Symbols",
"flags": "Flags",
"custom": "Stickers"
}
2019-10-16 17:17:29 +02:00
This setting lets you pass in the text value that goes into the `title`
attribute for the emoji categories. These strings will be translated, but for
your custom text to be translatable, you'll need to wrap it in `__()` `
somewhere in your own code.
2018-09-03 13:24:37 +02:00
emoji_image_path
----------------
2017-07-16 12:27:21 +02:00
2018-09-03 13:24:37 +02:00
* Default: `` 'https://twemoji.maxcdn.com/2/' ``
2017-07-16 12:27:21 +02:00
2018-09-03 13:24:37 +02:00
When `use_system_emojis`_ is set to `` false `` , then this is the URL from where image files for
2017-07-16 12:27:21 +02:00
displaying emojis will be fetched.
2018-09-13 11:46:42 +02:00
enable_muc_push
---------------
* Default: `` false ``
If true, then Converse will try to register
`XEP-0357 push notification App Server(s) <https://xmpp.org/extensions/xep-0357.html#general-architecture> `_
for the MUC domain of any newly entered groupchat.
The app servers are specified with the `push_app_servers`_ option.
.. note ::
Registering a push app server against a MUC domain is not (yet) standardized
and this feature should be considered experimental.
2018-05-29 12:00:23 +02:00
enable_smacks
-------------
* Default: `` false ``
Determines whether `XEP-0198 Stream Management <https://xmpp.org/extensions/xep-0198.html> `_
support is turned on or not.
2019-12-29 14:47:25 +01:00
Recommended to set to `` true `` if a websocket connection is used.
2019-11-22 00:11:26 +01:00
Please see the :ref: `websocket-url` configuration setting.
2018-05-29 12:00:23 +02:00
2016-05-28 08:35:16 +02:00
filter_by_resource
------------------
* Default: `` false ``
2018-08-23 09:41:39 +02:00
Before version 1.0.3 Converse would ignore received messages if they were
2016-05-28 08:35:16 +02:00
intended for a different resource then the current user had. It was decided to
drop this restriction but leave it configurable.
2020-08-27 23:26:51 +02:00
filter_url_query_params
-----------------------
* Default: `` null ``
Accepts a string or array of strings. Any query strings from URLs that match this setting will be removed.
2016-01-18 11:37:59 +01:00
fullname
--------
If you are using prebinding, can specify the fullname of the currently
logged in user, otherwise the user's vCard will be fetched.
2018-03-31 18:29:01 +02:00
geouri_regex
2020-09-01 12:21:32 +02:00
------------
2018-03-31 18:29:01 +02:00
* Default: `` /https:\/\/www.openstreetmap.org\/.*#map=[0-9]+\/([\-0-9.]+)\/([\-0-9.]+)\S*/g ``
Regular expression used to extract geo coordinates from links to openstreetmap.
geouri_replacement
2018-06-01 09:17:18 +02:00
------------------
2018-03-31 18:29:01 +02:00
* Default: `` 'https://www.openstreetmap.org/?mlat=$1&mlon=$2#map=18/$1/$2' ``
String used to replace geo-URIs with. Ought to be a link to osm or similar. `` $1 `` and `` $2 `` is replaced by
latitude and longitude respectively.
2020-10-23 20:49:10 +02:00
hide_muc_participants
---------------------
* Default: `` false ``
Option which allows you to hide the participants list by default.
2016-01-18 11:37:59 +01:00
hide_offline_users
------------------
* Default: `` false ``
2019-10-17 13:17:33 +02:00
If set to `` true `` , then offline users aren't shown in the roster.
2016-01-18 11:37:59 +01:00
2017-05-07 18:58:52 +02:00
hide_open_bookmarks
-------------------
2020-10-20 06:45:35 +02:00
* Default: `` false `` (`` true `` when the `view_mode`_ is set to `` fullscreen `` ).
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.
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.
2019-08-23 10:41:28 +02:00
The translations for that locale must be served in JSON format at `/dist/locales/${i18n}-LC_MESSAGES-converse-po.js` .
The default webpack configuration for Converse.js ensures that these files are
generated and placed in the right location.
2017-09-24 20:36:39 +02:00
If an explicit locale is specified via the `` i18n `` setting and the
2019-08-23 10:41:28 +02:00
translations for that locale are not found, then Converse will fall back to trying to determine the browser's language
and fetching those translations, or if that fails the default English strings will be used.
2016-01-18 11:37:59 +01:00
2018-11-12 18:46:03 +01:00
idle_presence_timeout
---------------------
* Default: `` 300 ``
The amount of seconds after which the user is considered to be idle
and an idle presence according to XEP-0319 is sent.
If the given value is negative or `` 0 `` , this feature is disabled.
2020-08-28 23:12:21 +02:00
image_urls_regex
----------------
2020-08-31 20:29:51 +02:00
* Default: `` null ``
2020-08-28 23:12:21 +02:00
2020-08-31 20:29:51 +02:00
Any URL in a message that matches the regex in this setting will be considered an image and rendered, if `show_images_inline`_ is set to `` true `` .
If the image cannot be rendered, a hyperlink will be rendered instead.
For example, to render Imgur images inline, you can use the following regex: `` /^https?:\/\/(?:www.)?(?:imgur\.com\/\w{7})\/?$/i ``
2020-08-28 23:12:21 +02: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.
2019-06-05 10:01:55 +02:00
This value may be provided together with a `` password `` instead of supplying a
`credentials_url`_ when setting `` auto_login `` to `` true `` .
2015-03-21 21:32:04 +01:00
2019-07-26 17:53:18 +02:00
.. _`keepalive`:
keepalive
---------
* Default: `` true ``
Determines whether Converse will attempt to keep you logged in across page loads.
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'
]
2018-06-06 11:07:59 +02:00
This setting restricts the locales that are supported by Converse and
2017-10-30 10:25:30 +01:00
therefore what may be given as value for the :ref: `i18n` option.
Any other locales will be ignored.
2017-09-24 20:36:39 +02:00
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.
2019-02-26 10:34:41 +01:00
locked_muc_domain
-----------------
* Default: `` false ``
2019-03-27 13:13:07 +01:00
* Allowed values: `` false `` , `` true `` , `` 'hidden' ``
2019-02-26 10:34:41 +01:00
2019-03-27 13:13:07 +01:00
By setting this value to something truthy, you restrict the multi-user chat (MUC) domain to only the value
2019-02-26 10:34:41 +01:00
specified in `muc_domain`_ .
2019-03-27 13:13:07 +01:00
If the value is set to `'hidden'` (which is also truthy), then the MUC domain
will not be shown to users.
2019-03-26 13:29:33 +01:00
locked_muc_nickname
-------------------
* Default: `` false ``
This setting allows you to restrict the multi-user chat (MUC) nickname that a
user uses to a particular value.
Where the nickname value comes from depends on other settings.
The `nickname`_ configuration setting takes precedence ahead of any other
nickname value. If that's not set, then the "nickname" value from the user's
VCard is taken, and if that is not set but `muc_nickname_from_jid`_ is set to
`` true `` , then the node of the user's JID (the part before the `` @ `` ) is used.
If no nickame value is found, then an error will be raised.
2019-02-26 10:34:41 +01:00
2021-01-13 10:42:22 +01:00
mam_request_all_pages
---------------------
* Default: `` true ``
When requesting messages from the archive, Converse will ask only for messages
newer than the most recent cached message.
When there are many archived messages since that one, the returned results will
be broken up in to pages, set by `archived_messages_page_size`_ .
By default Converse will request all the pages until all messages have been
fetched, however for large archives this can slow things down dramatically.
This setting turns the paging off, and Converse will only fetch the latest
page.
.. note ::
If paging is turned off, there will appear gaps in the message history.
Converse currently doesn't yet have a way to inform the user of these gaps or
to let them be filled.
2020-10-15 09:51:19 +02:00
muc_hats
2020-12-11 13:57:16 +01:00
--------
2020-04-13 15:19:21 +02:00
2020-10-15 09:51:19 +02:00
* Default: `` ['xep317'] ``
2020-04-13 15:19:21 +02:00
Since version 7 Converse now has rudimentary support for `XEP-0317 Hats <https://xmpp.org/extensions/xep-0317.html> `_ .
2020-10-15 09:51:19 +02:00
It is also possible to display VCard roles, MUC affiliation and MUC role along with hats.
By default only XEP-0317 hats are considered.
For the inclusion of VCard roles `` 'vcard_roles' `` must be added to the list.
For the inclusion of MUC affiliation and MUC role, the specific affiliations and roles
to be used must be added to the list e.g. `` 'owner','participant' `` .
Example:
For XEP-0317 hats and VCard roles this setting should be set to:
`` 'muc_hats': ['xep317', 'vcard_roles'] ``
For VCard roles, admin MUC affiliation and moderator MUC role:
`` 'muc_hats': ['vcard_roles', 'admin', 'moderator'] ``
And to prevent the displaying of anything, an empty list must be used:
`` 'muc_hats': [] ``
2020-04-13 15:19:21 +02:00
2019-06-19 14:51:34 +02:00
muc_mention_autocomplete_min_chars
-----------------------------------
* Default: `` 0 ``
The number of characters that need to be entered before the auto-complete list
of matching nicknames is shown.
2019-11-11 15:27:34 +01:00
muc_mention_autocomplete_filter
-------------------------------
* Default: `` contains ``
2019-11-22 12:57:51 +01:00
The method used for filtering MUC participants when using auto-complete.
2019-11-11 15:27:34 +01:00
Valid values are `` contains `` and `` starts_with `` .
muc_mention_autocomplete_show_avatar
2019-11-22 12:57:51 +01:00
------------------------------------
2019-11-11 15:27:34 +01:00
* Default: `` true ``
2019-11-22 12:57:51 +01:00
Show avatars of MUC participants when using auto-complete.
2019-11-11 15:27:34 +01:00
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
-------------------------
2018-11-12 19:41:17 +01:00
* Default: `` 20000 ``
2016-03-07 18:16:57 +01:00
The amount of time (in milliseconds) to wait when requesting archived messages
from the XMPP server.
2019-06-05 10:01:55 +02:00
Used in conjunction with `` message_archiving `` and in context of `XEP-0313: Message Archive Management <https://xmpp.org/extensions/xep-0313.html> `_ .
2016-03-07 18:16:57 +01:00
2014-12-07 00:53:17 +01:00
message_carbons
---------------
2018-11-12 20:30:19 +01:00
* Default: `` true ``
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.
2019-05-31 16:03:20 +02:00
This is especially important with Converse, where each browser
2014-12-07 00:53:17 +01:00
tab serves as a separate IM client.
2019-05-31 16:03:20 +02:00
XEP-0280 requires server support, so make sure that message carbons are enabled
on your server.
2014-12-07 00:53:17 +01:00
2019-06-16 14:16:35 +02:00
message_limit
-------------
* Default: `` 0 ``
Determines the allowed amount of characters in a chat message. A value of zero means there is no limit.
Note, this limitation only applies to the Converse UX code running in the browser
and it's trivial for an attacker to bypass this restriction.
You should therefore also configure your XMPP server to limit message sizes.
2020-02-22 21:12:40 +01:00
modtools_disable_assign
-----------------------
* Default: `` false ``
* Possible Values: `` true `` , `` false `` , `` ['owner', 'admin', 'member', 'outcast', 'none', 'moderator', 'participant', 'visitor'] ``
This setting allows you to disable (either completely, or fine-grained) which affiliations and or roles
may be assigned in the moderator tools modal.
modtools_disable_query
----------------------
* Default: `` [] ``
* Possible Values: `` ['owner', 'admin', 'member', 'outcast', 'none', 'moderator', 'participant', 'visitor'] ``
This setting allows you to disable which affiliations or roles may be queried in the moderator tools modal.
If all roles or all affiliations are disabled, then the relevant tab won't be
showed at all.
2019-06-16 14:16:35 +02:00
2020-12-11 13:57:16 +01:00
muc_clear_messages_on_leave
---------------------------
* Default: `` true ``
Starting with Converse 8.0.0, when leaving a MUC, all cached messages in the history is cleared.
Note: This means that you lose your history of decrypted OMEMO messages and cannot recover it.
2019-04-25 10:59:16 +02:00
muc_disable_slash_commands
--------------------------
2016-12-07 14:48:47 +01:00
* Default: `` false ``
Allows you to disable the moderator commands such as `` /kick `` or `` /ban `` .
2019-01-14 09:59:54 +01:00
Ìf set to `` true `` all commands will be disabled.
You can also selectively disable some moderator commands by setting it to an
array of commands you don't want.
The following example will disable 'mute' and 'voice' command:
.. code-block :: javascript
2019-04-25 10:59:16 +02:00
muc_disable_slash_commands: ['mute', 'voice'],
2016-12-07 14:48:47 +01:00
2016-10-26 15:21:36 +02:00
muc_domain
----------
* Default: `` undefined ``
2019-02-26 10:34:41 +01:00
The default MUC (multi-user chat) domain that should be used.
When setting this value, users can only enter the name when opening a new MUC,
and don't have to add the whole address (i.e. including the domain part).
Users can however still enter the domain and they can still open MUCs with
other domains.
2016-10-26 15:21:36 +02:00
2019-08-30 10:59:11 +02:00
If you want to restrict MUCs to only this domain, then set `locked_muc_domain`_ to
2019-02-26 10:34:41 +01:00
`` true `` .
2016-10-26 15:21:36 +02:00
2019-07-26 13:32:21 +02:00
muc_fetch_members
-----------------
* Default: `` true ``
2020-02-20 17:11:07 +01:00
* Possible values: Array containing any of the following: `` ['member', 'admin', 'owner'] ``
2019-07-26 13:32:21 +02:00
Determines whether Converse.js will fetch the member lists for a MUC
(multi-user chat) when the user first enters it.
Here's the relevant part from the MUC XEP: https://xmpp.org/extensions/xep-0045.html#getmemberlist
The MUC service won't necessarily allow any user to fetch member lists,
but can usually be configured to do so.
The member lists consists of three lists of users who have the affiliations
`` member `` , `` admin `` and `` owner `` respectively.
By fetching member lists, Converse.js will always show these users as
2020-02-20 17:11:07 +01:00
participants of the MUC, giving them a permanent "presence" in the MUC.
2019-07-26 13:32:21 +02:00
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
2019-03-04 17:49:44 +01:00
users (so-called "registered rooms" in `MUC-0045 <https://xmpp.org/extensions/xep-0045.html#createroom> `_ ).
2016-08-11 18:03:02 +02:00
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.
2020-05-05 15:32:15 +02:00
muc_send_probes
---------------
* Default: `` false ``
If set to `` true `` , then whenever Converse receives a MUC message with an author for which we don't have
any information (i.e. because that user is currently not in the MUC), then Converse will send out a `` <presence> ``
stanza of type `` probe `` in order to request the authors presence data.
2021-07-15 11:54:55 +02:00
Prosody has support in `trunk` for this.
2020-05-05 15:32:15 +02:00
The point of sending out presence probes is in order to receive
presence-related metadata, such as `XEP-0317 Hats <https://xmpp.org/extensions/xep-0317.html> `_ .
2020-05-11 10:33:29 +02:00
.. note ::
Although this behavior is described in the `presence business rules of XEP-0045, section 17.3 point 4 <https://xmpp.org/extensions/xep-0045.html#bizrules-presence> `_ ,
few XMPP servers support this.
.. note ::
If member lists are fetched via muc_fetch_members, then the occupants created
based on those member lists won't be probed again later (given that the
occupants are already created). Certain metadata like XEP-0317 hats are not
included in the member lists, which means that this metadata will be missing for
those occupants.
2020-05-05 15:32:15 +02:00
2019-03-08 08:20:09 +01:00
muc_respect_autojoin
--------------------
* Default; `` true ``
Determines whether Converse will respect the autojoin-attribute of bookmarks. Per default
all MUCs with set autojoin flag in their respective bookmarks will be joined on
startup of Converse. When set to `` false `` no MUCs are automatically joined based on
their bookmarks.
2019-12-30 13:23:52 +01:00
muc_roomid_policy
-----------------
* Default: `` null ``
This option defines the regular expression that a room id must satisfy to allow the
room creation. Server administrators may want to impose restrictions on the minimum
and maximum length and the allowed character set allowed for room ids. Otherwise
users might create rooms which are difficult to handle.
However, restricting that on the server only leads to bad UX as users might learn of
the servers policy only after they have tried to create a room. Furthermore error
messages from XMPP-servers might not be self-explanatory.
Therefore this option allows converse to already check the policy and disallow the
user from even trying to entering/creating such a room.
As this only makes sense on your own server, the check is applied only if the domain
part equals `muc_domain`_ . If `muc_domain`_ is unset, then this check is disabled
completely.
Example:
.. code-block :: javascript
muc_roomid_policy: /^[a-z0-9._-]{5,40}$/,
See also: `muc_roomid_policy_hint`_
muc_roomid_policy_hint
----------------------
* Default: `` null ``
This option can be used in conjuction with `muc_roomid_policy`_ in order to give
a written explanation of the imposed room id policy. You can use the html-tags
`` <br> `` , `` <b> `` , and `` <em> `` to allow some basic styling.
Example:
.. code-block :: javascript
muc_roomid_policy_hint: '<br><b>Policy for groupchat id:</b> <br> - between 5 and 40 characters,<br>- lowercase from a to z (no special characters) or<br>- digits or<br>- dots (.) or<br>- underlines (_) or<br>- hyphens (-),<br>- no spaces<br>',
2020-12-02 14:53:22 +01:00
muc_show_info_messages
----------------------
2017-02-24 11:54:54 +01:00
2021-09-09 16:20:33 +02:00
* Default: List composed of MUC status codes, role changes, join and leave events and affiliation changes. The values of converse.MUC_INFO_CODES below are joined to build the default list:
2020-12-02 14:53:22 +01:00
.. code-block :: javascript
2021-09-09 16:20:33 +02:00
2020-12-02 14:53:22 +01:00
converse.MUC_AFFILIATION_CHANGES_LIST = ['owner', 'admin', 'member', 'exowner', 'exadmin', 'exmember', 'exoutcast']
converse.MUC_ROLE_CHANGES_LIST = ['op', 'deop', 'voice', 'mute'];
converse.MUC_TRAFFIC_STATES_LIST = ['entered', 'exited'];
converse.MUC_INFO_CODES = {
'visibility_changes': ['100', '102', '103', '172', '173', '174'],
'self': ['110'],
'non_privacy_changes': ['104', '201'],
'muc_logging_changes': ['170', '171'],
'nickname_changes': ['210', '303'],
'disconnect_messages': ['301', '307', '321', '322', '332', '333'],
'affiliation_changes': [...converse.AFFILIATION_CHANGES_LIST],
'join_leave_events': [...converse.MUC_TRAFFIC_STATES_LIST],
'role_changes': [...converse.MUC_ROLE_CHANGES_LIST],
};
This setting determines which info messages will Converse show inside a chatroom.
It is recommended to use the aforementioned Converse object in the following fashion
to build the list of desired info messages that will be shown:
.. code-block :: javascript
2021-09-09 16:20:33 +02:00
2020-12-02 14:53:22 +01:00
muc_show_info_messages: [
...converse.MUC_INFO_CODES.visibility_changes,
...converse.MUC_INFO_CODES.self,
...converse.MUC_INFO_CODES.non_privacy_changes,
...converse.MUC_INFO_CODES.muc_logging_changes,
...converse.MUC_INFO_CODES.nickname_changes,
...converse.MUC_INFO_CODES.disconnect_messages,
...converse.MUC_INFO_CODES.affiliation_changes,
...converse.MUC_INFO_CODES.join_leave_events,
...converse.MUC_INFO_CODES.role_changes,
]
By default all info messages are shown.
The behaviour of this setting is whitelisting, so if it is overriden all the desired
events must be specified.
2017-02-24 11:54:54 +01:00
2020-12-02 14:53:22 +01:00
If an empty list is provided, no info message will be displayed at all.
2017-02-24 11:54:54 +01:00
2020-01-10 10:26:01 +01:00
muc_show_logs_before_join
-------------------------
* Default: `` false ``
If set to `` true `` , when opening a MUC for the first time (or if you don't have
a nickname configured for it), you'll see the message history (if the
2020-12-16 14:35:53 +01:00
server supports `XEP-0313 Message Archive Management <https://xmpp.org/extensions/xep-0313.html> `_ )
2020-01-10 10:26:01 +01:00
and the nickname form at the bottom.
2021-03-01 13:57:13 +01:00
2020-12-08 14:51:04 +01:00
muc_subscribe_to_rai
--------------------
* Default: `` false ``
2020-12-17 13:15:43 +01:00
This option enables support for `XEP-0437 Room Activity Indicators <https://xmpp.org/extensions/xep-0437.html> `_ .
2020-12-08 14:51:04 +01:00
2020-12-16 14:35:53 +01:00
When a MUC is no longer visible (specifically, when the `` hidden `` flag becomes `` true `` ),
then Converse will exit the MUC and subscribe to activity indicators on the MUC host.
When the MUC becomes visible again (`` hidden `` gets set to `` false `` ), the MUC will be rejoined.
2020-12-08 14:51:04 +01:00
2019-04-23 11:42:48 +02:00
.. _`nickname`:
2018-03-27 16:05:38 +02:00
nickname
--------
* Default: `` undefined ``
This setting allows you to specify the nickname for the current user.
The nickname will be included in presence requests to other users and will also
be used as the default nickname when entering MUC chatrooms.
2019-03-26 13:29:33 +01:00
This value will have first preference ahead of other nickname sources, such as
2019-06-05 10:01:55 +02:00
the VCard `` nickname `` value.
2019-03-26 11:31:11 +01:00
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.
2018-11-04 08:49:00 +01:00
notification_delay
------------------
* Default: `` 5000 ``
Desktop notifications will be shown for a time of `` notification_delay ``
ms. Setting this to `` 0 `` will make the notification stay until dismissed by
the user (requires browser support).
2016-03-01 09:58:36 +01:00
notification_icon
-----------------
2018-11-02 22:16:56 +01:00
* Default: `` 'logo/conversejs-filled.svg' ``
2016-03-01 09:58:36 +01:00
This option specifies which icon is shown in HTML5 notifications, as provided
by the `` src/converse-notification.js `` plugin.
2020-08-26 00:02:53 +02:00
notify_nicknames_without_references
-----------------------------------
* Default: `` false ``
Enables notifications for nicknames in messages that don't have associated
XEP-0372 references linking them to the JID of the person being mentioned.
In Converse, these would be nicknames that weren't mentioned via the `` @ `` sign.
2018-06-12 17:01:10 +02:00
oauth_providers
---------------
* Default: `` [] ``
Allows you to specify a list of OAuth providers that the user may use to log in
with.
.. note ::
Your XMPP server will have to support Oauth logins
.. code-block :: javascript
converse.initialize({
oauth_providers: {
'github': {
'client_id': '1338d9f7ff52b1309b29',
'host': 'chat.example.org',
'class': 'fa-github-alt',
'id': 'github',
'name': 'Github'
},
'twitter': {
'client_id': '0332d98cff83b1999b22',
'host': 'chat.example.org',
'class': 'fa-twitter',
'id': 'twitter',
'name': 'Twitter'
}
},
});
2019-07-06 10:38:52 +02:00
omemo_default
-------------
* Default: `` false ``
Use OMEMO encryption by default when the chat supports it.
2015-05-27 18:14:58 +02:00
ping_interval
-------------
2019-08-10 18:47:32 +02:00
* Default: `` 60 ``
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
2018-06-06 11:07:59 +02:00
Inside the `` ./sounds `` directory of the Converse 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.
2019-11-22 12:57:51 +01: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`
2020-10-20 06:45:35 +02:00
This setting should be used in conjunction with `authentication`_ set to `prebind` .
2015-03-05 23:11:07 +01:00
2018-08-23 09:41:39 +02:00
It allows you to specify a URL which Converse will call when it needs to get
2015-03-05 23:11:07 +01:00
the RID and SID (Request ID and Session ID) tokens of a BOSH connection, which
2018-08-23 09:41:39 +02:00
Converse 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
2018-06-06 11:07:59 +02:00
(i.e. this instance of Converse).
2017-02-22 22:13:23 +01:00
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.
2018-06-06 11:07:59 +02:00
In Converse, the indicated chat status of a roster contact will be taken from the
2017-02-22 22:13:23 +01:00
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.
2019-11-22 12:57:51 +01:00
.. _`assets_path`:
2019-10-06 12:48:05 +02:00
assets_path
-----------
2019-11-22 12:57:51 +01:00
* Default: `` '/dist/' `` or the `publicPath <https://webpack.js.org/guides/public-path/> `_ value as configured in the relevant Webpack configuration.
2019-10-06 12:48:05 +02:00
Since version 5.0.0, Converse serves a smaller bundle by extracting various
resources (for example emojis and translations) into separate files (aka
"chunks") which are loaded asynchronously on demand.
The URL path at which these resources are loaded is normally set by the `` publicPath ``
setting of Webpack but this means that it's hardcoded to a particular value at
compile time.
This configuration seting allows this value to be set at runtime as well.
2022-04-06 10:07:27 +02:00
.. _persistent-store:
2019-12-03 13:51:57 +01:00
persistent_store
----------------
2022-04-06 10:07:27 +02:00
* Default: `` IndexedDB ``
2020-10-30 12:51:55 +01:00
* Valid options: `` localStorage `` , `` IndexedDB `` , `` sessionStorage `` , `` BrowserExtLocal `` , `` BrowserExtSync ``
2019-12-03 13:51:57 +01:00
Determines which store is used for storing persistent data.
From version 6.0.0 onwards, Converse supports storing data in
`IndexedDB <https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Basic_Concepts_Behind_IndexedDB> `_ .
IndexedDB is not subjected to the same space constraints as localStorage and is
also a requirement for progressive web apps which don't need persistent a
internet connectivity to be functional.
2020-10-30 12:51:55 +01:00
From version 7.0.0 onwards, Converse supports storing data in
`Browser Extension storage <https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage#Example_extensions> `_ .
When Converse is running inside a web browser extension, it can now take advantage of storage optimized to meet the specific storage needs of extensions.
2020-10-16 09:02:12 +02:00
BrowserExtSync represents the sync storage area.
2020-10-30 12:51:55 +01:00
Items in sync storage are synced by the browser and are available across all instances of that browser that the user is logged into, across different devices.
2020-10-16 09:02:12 +02:00
BrowserExtLocal represents the local storage area.
2020-10-30 12:51:55 +01:00
Items in local storage are local to the machine the extension was installed on
2021-06-16 19:25:52 +02:00
prune_messages_above
--------------------
* Default: `` undefined ``
* Valid options: Any integer value above 0.
If this option is set to a positive integer, the chat history will be kept to
that number. As new messages come in, older messages will be deleted to
maintain the history size.
.. note ::
When deleting locally stored decrypted OMEMO messages, you will **not** be
able to decrypt them again after fetching them from the server archive.
pruning_behavior
----------------
* Default: `` unscrolled ``
* Valid options: `` unscrolled `` , `` scrolled ``
By default the chat history will only be pruned when the chat window isn't
scrolled up (`` 'unscrolled' `` ).
If set to `` 'scrolled' `` , then pruning will also happen when the chat is
scrolled up. Be aware that this will interfere with MAM-based infinite
scrolling, and this setting only makes sense when infinite scrolling with MAM
is disabled.
2019-12-03 13:51:57 +01:00
2018-06-11 14:17:34 +02:00
push_app_servers
2018-06-12 17:01:10 +02:00
----------------
2018-06-06 11:07:59 +02:00
2018-06-07 16:25:59 +02:00
* Default: `` [] ``
2018-06-06 11:07:59 +02:00
2018-06-07 16:25:59 +02:00
This option lets you enable or disable so-called push notification "App Servers"
(as per `XEP-0357 <https://xmpp.org/extensions/xep-0357.html> `_ ).
2018-06-06 11:07:59 +02:00
2018-06-07 16:25:59 +02:00
For each "App Server" an object needs to be passed in. When enabling, you need
to specify `` jid `` and `` node `` values. You can also provide a
`` secret `` , if required by your App Server.
2018-06-06 11:07:59 +02:00
2018-06-07 16:25:59 +02:00
When disabling, you need to specify at least a `` jid `` and set `` disabled `` to
`` true `` . This will disable notifications to all pubsub nodes on that "App
Server". If you want to disable only a particular node, then specify a `` node ``
value as well.
2018-06-06 11:07:59 +02:00
2018-06-07 16:25:59 +02:00
For example:
2018-06-06 11:07:59 +02:00
2018-06-07 16:25:59 +02:00
.. code-block :: javascript
2018-06-06 11:07:59 +02:00
2018-06-07 16:25:59 +02:00
converse.initialize({
2018-06-11 14:17:34 +02:00
'push_app_servers': [{
2018-06-07 16:25:59 +02:00
'jid': 'push-4@client.example',
'node': 'yxs32uqsflafdk3iuqo',
'disable': true
}, {
'jid': 'push-5@client.example',
'node': 'yxs32uqsflafdk3iuqo',
}]
});
2018-06-06 11:07:59 +02:00
2019-01-12 17:04:17 +01:00
2021-09-09 16:20:33 +02: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.
render_media
------------
* Default: `` true ``
2021-09-30 13:57:45 +02:00
* Possible values: `` true `` , `` false `` or an array of domains for which media
should automatically be rendered.
2021-09-09 16:20:33 +02:00
2021-09-30 13:57:45 +02:00
If `` true `` , media URLs (images, audio and video) will be rendered in the chat.
2021-09-09 16:20:33 +02:00
2021-09-30 13:57:45 +02:00
If `` false `` , the URLs won't render as media, and instead only clickable links
will be shown.
2021-09-09 16:20:33 +02:00
2021-09-30 13:57:45 +02:00
Setting it to an array of domains means that media will be rendered only for URLs
matching those domains.
2021-09-09 16:20:33 +02:00
2021-10-01 12:51:33 +02:00
Media URLs are those URLs which appear to point to media files as well as URLs
2022-04-04 13:14:17 +02:00
for which `Open Graph Protocol (OGP) <https://modules.prosody.im/mod_ogp.html> `_
2021-10-01 12:51:33 +02:00
data was received (for example via Prosody's `mod_ogp <https://modules.prosody.im/mod_ogp.html> `_ ).
The OGP metadata must come from the MUC itself, metadata sent from participants
themselves will not be shown.
Based on the OGP metadata Converse will render a URL preview (also known as an
"unfurl").
2021-09-30 13:57:45 +02:00
.. note ::
Note, even if this setting is `` false `` (or if the URL domain is not in the
array of allowed domains), a user can still click on the message
dropdown and click to show or hide the media for that particular message.
If you want to disable this ability, you can set the allowed domains for the
media type to an empty array.
See:
* `allowed_audio_domains`_
* `allowed_video_domains`_
* `allowed_image_domains`_
2021-09-09 16:20:33 +02:00
.. note ::
This setting, together with the three allowed domain settings above, obsolete
the `` show_images_inline `` , `` embed_audio `` and `` embed_videos `` settings.
2019-01-12 17:04:17 +01:00
.. _`roomconfig_whitelist`:
roomconfig_whitelist
--------------------
* Default: `` [] ``
A list of room config-option names. If this list is non-empty, only the corresponding room
config-options will be shown in the room configuration form. The default will show all options.
In the following example the user can only see (and thus change) the roomname and nothing else:
.. code-block :: javascript
roomconfig_whitelist: ['muc#roomconfig_roomname'],
2018-02-09 16:02:56 +01:00
root
----
* Default: `` window.document ``
2018-08-23 09:41:39 +02:00
When using Converse inside a web component's shadow DOM, you will need to set this settings'
2018-02-09 16:02:56 +01:00
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) {
2020-10-26 13:09:15 +01:00
const { converse } = event.detail;
2018-02-09 16:02:56 +01:00
converse.initialize({
root: shadowRoot,
// Other settings go here...
});
});
}
}
2014-12-07 00:53:17 +01:00
roster_groups
-------------
2019-01-14 12:06:02 +01:00
* Default: `` true ``
2014-12-07 00:53:17 +01:00
2019-01-14 12:06:02 +01:00
If set to `` true `` , Converse will show any roster groups you might have configured.
2014-12-07 00:53:17 +01:00
.. note ::
2018-08-23 09:41:39 +02:00
It's currently not possible to use Converse to assign contacts to groups.
2018-06-06 11:07:59 +02:00
Converse can only show users and groups that were previously configured
2014-12-07 00:53:17 +01:00
elsewhere.
2020-01-10 13:04:33 +01:00
send_chat_state_notifications
-----------------------------
* Default: `` true ``
2021-01-15 11:11:38 +01:00
* Allowed values: `` 'active', 'composing', 'gone' 'inactive', 'paused' ``
2020-01-10 13:04:33 +01:00
Determines whether chat state notifications (see `XEP-0085 <https://xmpp.org/extensions/xep-0085.html> `_ ) should be sent out or not.
Can also be set to an Array in order to allow only certain types of chat state notifications.
For example:
.. code-block :: javascript
converse.initialize({
'send_chat_state_notifications': ['composing']
});
2021-01-15 11:11:38 +01:00
send_chat_markers
-----------------
* Default: `` ['received', 'displayed', 'acknowledged'] ``
Determines which (if any) of the `XEP-0333 <https://xmpp.org/extensions/xep-0333.html> `_ chat markers will be sent out.
It's still up to Converse to decide when to send out the relevant markers, the
purpose of this setting is merely to turn on or off the sending of the
individual markers.
2020-01-10 13:04:33 +01:00
2019-08-03 21:49:44 +02:00
show_chat_state_notifications
-----------------------------
2017-02-14 14:00:45 +01:00
* Default: `` false ``
Specifies whether chat state (online, dnd, away) HTML5 desktop notifications should be shown.
2019-02-27 14:42:27 +01:00
show_client_info
----------------
* Default: `` true ``
Specifies whether the info icon is shown on the controlbox which when clicked opens an
"About" modal with more information about the version of Converse being used.
2022-03-24 21:41:05 +01:00
show_connection_url_input
-------------------------
* Default: `` false ``
Determines whether the login form should show an input element where the user
can enter the connection URL. If it's a websocket url, then upon form
submission the `websocket_url`_ setting will be updated with this value, and if
it's an HTTP URL then the `bosh_service_url`_ setting will be updated.
2014-12-07 00:53:17 +01:00
show_controlbox_by_default
--------------------------
2020-10-20 06:45:35 +02:00
* Default: `` false `` (`` true `` when the `view_mode`_ is set to `` fullscreen `` )
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?
2018-11-04 08:19:08 +01:00
If set to `` true `` , notifications will be shown in the following cases:
2016-03-08 12:01:23 +01:00
* 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.
2019-06-05 10:01:55 +02:00
* `` auto_subscribe `` is set to `` false `` and a new contact request is received.
2016-03-01 10:43:44 +01:00
2018-11-04 08:19:08 +01:00
If set to `` all `` , notifications will be shown even if the above conditions are
not fulfilled.
2016-03-01 10:43:44 +01:00
Requires the `src/converse-notification.js` plugin.
2020-06-04 14:27:51 +02:00
show_message_avatar
-------------------
* Default: `` true ``
Whether chat messages should also render the author's avatar.
show_images_inline
------------------
* Default: `` true ``
If set to `` false `` , images won't be rendered in chats, instead only their links will be shown.
2021-09-09 16:20:33 +02:00
Users will however still have the ability to render individual images via the message actions dropdown.
If you want to disallow users from doing so, set the `` allowed_image_domains `` option to an empty array `` [] `` .
2020-06-04 14:27:51 +02:00
2021-06-17 12:31:38 +02:00
2019-09-24 15:33:41 +02:00
show_retraction_warning
-----------------------
* Default: `` true ``
From `XEP-0424: Message Retraction <https://xmpp.org/extensions/xep-0424.html> `_ :
::
Due to the federated and extensible nature of XMPP it's not possible to remove a message with
full certainty and a retraction can only be considered an unenforceable request for such removal.
Clients which don't support message retraction are not obligated to enforce the request and
people could have seen or copied the message contents already.
By default Converse shows a warning to users when they retract a message, to
inform them that they don't have a guarantee that the message will be removed
everywhere.
This warning isn't applicable to all deployments of Converse and can therefore
be turned off by setting this config variable to `` false `` .
2020-01-10 13:04:33 +01:00
show_send_button
----------------
2017-07-16 12:27:21 +02:00
2020-04-14 14:49:09 +02:00
* Default: `` true ``
2018-12-04 12:52:25 +01:00
2020-01-10 13:04:33 +01:00
Adds a button to the chat which can be clicked or tapped in order to send the
message.
2018-12-04 12:52:25 +01:00
2018-05-29 12:00:23 +02:00
2020-11-25 16:26:33 +01:00
show_tab_notifications
----------------------
* Default: `` true ``
Determines whether an unread messages counter is shown in the tab.
2020-06-04 14:27:51 +02:00
singleton
---------
* Default: `` false ``
If set to `` true `` , then only one chat (one-on-one or groupchat) will be allowed.
The chat must be specified with the `auto_join_rooms`_ or `auto_join_private_chats`_ options.
This setting is useful together with `view_mode`_ set to `` embedded `` , when you
want to embed a chat into the page.
Alternatively you could use it with `view_mode`_ set to `` overlayed `` to create
a single helpdesk-type chat.
2018-05-29 12:00:23 +02:00
smacks_max_unacked_stanzas
--------------------------
* Default: `` 5 ``
This setting relates to `XEP-0198 <https://xmpp.org/extensions/xep-0198.html> `_
and determines the number of stanzas to be sent before Converse will ask the
server for acknowledgement of those stanzas.
2021-06-16 19:25:52 +02:00
2015-04-25 22:40:55 +02:00
sounds_path
-----------
2020-02-16 12:30:25 +01:00
* Default: `` ${assets_path}/sounds/ ``
2015-04-25 22:40:55 +02:00
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 `` .
2018-05-18 12:21:02 +02:00
2016-03-31 11:16:21 +02:00
sticky_controlbox
-----------------
2018-05-24 14:37:52 +02:00
* Default: `` false `` (`` true `` when the `` view_mode `` is set to `` fullscreen `` ).
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
2018-08-23 09:41:39 +02:00
devices when the intent is to use Converse as a web app. In this case
2016-03-31 11:16:21 +02:00
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-06-06 11:07:59 +02:00
The Converse plugins architecture can have an :ref: `dependencies`
2018-01-10 13:59:45 +01:00
plugin attribute. This enables you to specify an array of other plugins which
this one depends on.
2018-06-06 11:07:59 +02:00
Converse (more specifically, `pluggable.js <https://jcbrand.github.io/pluggable.js/> `_ )
2018-01-10 13:59:45 +01:00
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 ``
2019-12-03 13:51:57 +01:00
* Valid options: `` true `` , `` false `` , `` a resource name `` .
2016-02-18 10:17:00 +01:00
This option lets you synchronize your chat status (`online` , `busy` , `away` ) with other chat clients. In other words,
2019-06-05 10:01:55 +02:00
if you change your status to `` busy `` in a different chat client, your status will change to `` busy `` in Converse as well.
2016-02-18 10:17:00 +01:00
2018-08-23 09:41:39 +02:00
If set to `` true `` , Converse will synchronize with all other clients you are logged in with.
2016-02-18 10:17:00 +01:00
If set to `` false `` , this feature is disabled.
2018-08-23 09:41:39 +02:00
If set to `` a resource name `` , Converse will synchronize only with a client that has that particular resource assigned to it.
2014-12-07 00:53:17 +01:00
2018-11-14 15:56:28 +01:00
theme
-----
* Default: `` default ``
2022-04-06 18:16:56 +02:00
* Valid options: `` default `` , `` concord `` , `` dracula ``
2018-11-14 15:56:28 +01:00
Let's you set a color theme for Converse.
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
2019-05-06 11:16:56 +02:00
This option makes the time format for the time shown, for each message, configurable. Converse uses `DayJS <https://github.com/iamkun/dayjs> `_
2019-06-05 10:01:55 +02:00
for showing time. This option allows the configuration of the format in which `` DayJS `` will display the time for the messages. For detailed
description of time-format options available for `` DayJS `` you can check the
2019-05-06 11:16:56 +02:00
`default formatting options <https://github.com/iamkun/dayjs/blob/dev/docs/en/API-reference.md#displaying> `_ and the
`advanced options <https://github.com/iamkun/dayjs/blob/master/docs/en/Plugin.md#advancedformat> `_ .
2017-03-12 11:32:38 +01:00
2019-12-03 13:51:57 +01:00
use_system_emojis
-----------------
* Default: `` true ``
Determines whether emojis should be rendered by the user's system.
Not all operating systems support (all) emojis. So alternatively you can let
Converse render the emojis with `Twemoji <https://twemoji.twitter.com/> `_ .
See also `emoji_image_path`_ .
2014-12-07 00:53:17 +01:00
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,
2019-03-07 17:52:51 +01:00
spoiler: false,
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 ...
});
2017-07-15 08:17:41 +02:00
* *emoji* :
Enables rendering of emoji and provides a toolbar button for choosing them.
2019-03-07 17:52:51 +01:00
* *spoiler* :
Shows a button for showing`XEP-0382 <https://xmpp.org/extensions/xep-0382.html> `_ spoiler messages.
2017-07-15 08:17:41 +02:00
* *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`:
2018-11-18 19:14:22 +01:00
2015-02-08 19:35:58 +01:00
websocket_url
-------------
2015-04-02 13:07:59 +02:00
* Default: `` undefined ``
2015-02-08 19:35:58 +01:00
2019-11-22 00:11:26 +01:00
Example: `` ws://xmpp.example.com:5280/ws/ ``
Example with reverse-proxy and TLS: `` wss://xmpp.example.com/ws/ ``
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
2018-08-23 09:41:39 +02:00
Converse can connect to.
2015-02-08 19:35:58 +01:00
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.
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
2018-08-23 09:41:39 +02:00
The `` view_mode `` setting configures Converse's mode and resulting behavior.
2017-02-16 20:29:48 +01:00
2018-12-03 13:08:55 +01:00
* `` overlayed `` is the original mode, in which the chats appeared as small boxes overlaying a webpage which can contain arbitrary content.
* `` fullscreen `` is for a fullpage and single-page app.
2021-12-10 22:13:01 +01:00
* `` embedded `` is used to embed Converse into a particular part of the web page. Put the custom element `` <converse-root></converse-root> `` into your page HTML there were you want Converse to appear. See `conversejs.org/demo/embedded.html <https://conversejs.org/demo/embedded.html> `_ for an example of this view mode.
2018-12-03 13:08:55 +01:00
* `` mobile `` is for smaller viewports. Converse is responsive, and the other views will also resize to fit a smaller viewport, but certain behavioural changes won't be made. For example, when using `` overlayed `` in a mobile view, Converse won't know which chat is currently visible and therefore won't be able to properly show notifications for chats that are obscured.
2017-02-16 20:29:48 +01:00
2018-12-03 13:08:55 +01:00
.. note ::
Before the introduction of this setting (in version 3.3.0), there were there
different builds, each for the different modes.
These were:
2017-02-16 20:29:48 +01:00
2018-12-03 13:08:55 +01:00
* `` converse-mobile.js `` for the `` mobile `` mode
* `` converse-muc-embedded.js `` for embedding a single MUC room into a DOM element with id `` conversejs ``
* `` converse.js `` for the `` overlayed `` mode
* `` inverse.js `` for the `` fullscreen `` mode
2017-02-16 20:29:48 +01:00
2018-12-03 13:08:55 +01:00
Besides having different builds, certain plugins had to be whitelisted
and blacklisted for the different modes.
2017-02-16 20:29:48 +01:00
2018-12-03 13:08:55 +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
2018-12-03 13:08:55 +01:00
For both those modes the `` converse-minimize `` and `` converse-dragresize ``
plugins had to be blacklisted.
2017-11-02 15:30:24 +01:00
2018-12-03 13:08:55 +01:00
When using `` converse-muc-embedded.js `` various plugins also had to manually be
blacklisted.
2018-02-09 16:33:48 +01:00
2018-12-03 13:08:55 +01:00
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).
2018-02-09 16:33:48 +01:00
2018-12-03 13:08:55 +01:00
Blacklisting now happens automatically.
2018-02-09 16:33:48 +01:00
2018-12-03 13:08:55 +01:00
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.
2018-02-09 16:33:48 +01:00
2019-02-13 16:25:39 +01:00
Since version 4.0.0, there is now also only one CSS file to be used for all
2018-12-03 13:08:55 +01:00
the different view modes, `` converse.css `` .
2018-05-24 14:37:52 +02:00
2018-12-03 13:08:55 +01:00
The `` converse-muc-embedded.js `` build can still be built, 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-12-03 13:08:55 +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
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.
2018-06-06 11:07:59 +02:00
From Converse 3.0 onwards most of the API is available only to plugins and
2017-02-16 20:29:48 +01:00
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
2018-03-15 21:22:32 +01:00
converse-chatboxes
2017-02-16 20:29:48 +01:00
converse-chatview
converse-controlbox
converse-core
2018-03-15 21:22:32 +01:00
converse-disco
2017-02-16 20:29:48 +01:00
converse-dragresize
2018-03-15 21:22:32 +01:00
converse-fullscreen
2017-02-16 20:29:48 +01:00
converse-headline
converse-mam
converse-minimize
converse-muc
2018-03-15 21:22:32 +01:00
converse-muc-embedded
2017-02-16 20:29:48 +01:00
converse-notification
converse-ping
2018-03-15 21:22:32 +01:00
converse-profile
2017-02-16 20:29:48 +01:00
converse-register
2018-03-15 21:22:32 +01:00
converse-roomslist
2017-02-16 20:29:48 +01:00
converse-rosterview
2018-03-15 21:22:32 +01:00
converse-singleton
converse-spoilers
converse-vcard'
2017-02-16 20:29:48 +01:00
2018-03-15 21:22:32 +01:00
.. note ::
If you are using a custom build which excludes some core plugins, then you
should blacklist them so that malicious scripts can't register their own
plugins under those names. See `blacklisted_plugins`_ for more info.
2017-02-16 20:29:48 +01:00
2018-03-15 21:22:32 +01:00
Example:
2017-02-16 20:29:48 +01:00
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
2018-03-15 21:22:32 +01:00
whitelisted_plugins: ['myplugin']
2017-02-16 20:29:48 +01:00
});
});
2018-03-26 15:38:03 +02:00
xhr_user_search_url
-------------------
.. note ::
XHR stands for XMLHTTPRequest, and is meant here in the AJAX sense (Asynchronous JavaScript and XML).
* Default: `` null ``
There are two ways to add users.
* The user inputs a valid JID (Jabber ID, aka XMPP address), and the user is added as a pending contact.
* 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.
By providing an XHR search URL, you're enabling the second mechanism.
*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 `` jid `` and `` fullname `` .
.. code-block :: javascript
[{"jid": "marty@mcfly.net", "fullname": "Marty McFly"}, {"jid": "doc@brown.com", "fullname": "Doc Brown"}]
.. note ::
Make sure your server script sets the header `Content-Type: application/json` .
This is the URL to which an XHR GET request will be made to fetch user data from your remote server.
The query string will be included in the request with `` q `` as its key.
The data returned must be a JSON encoded list of user JIDs.
2018-05-17 18:26:06 +02:00
.. note ::
2018-08-23 09:41:39 +02:00
Converse will construct the XHR get URL by simply appending
2018-05-17 18:26:06 +02:00
`` q=<query string entered> `` to the URL given by `` xhr_user_search_url `` .
It is therefore important that the necessary question mark (`` ? `` ) preceding the
URL's query component or necessary delimiters (`` & `` ) are included. See valid
examples below.
Examples:
.. code-block :: javascript
xhr_user_search_url: 'https://some.url/some_path?',
xhr_user_search_url: 'https://some.url/some_path?api_key=somekey&',