configuration.rst 76 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431
  1. .. raw:: html
  2. <div id="banner"><a href="https://github.com/jcbrand/converse.js/blob/master/docs/source/configuration.rst">Edit me on GitHub</a></div>
  3. =============
  4. Configuration
  5. =============
  6. The included minified JavaScript and CSS files can be used for demoing or testing, but
  7. you'll want to configure Converse to suit your needs before you deploy it
  8. on your website.
  9. Converse is passed its configuration settings when you call its *initialize* method.
  10. You'll most likely want to call the *initialize* method in your HTML page. For
  11. an example of how this is done, please see the bottom of the *./index.html* page.
  12. Please refer to the `Configuration settings`_ section below for info on
  13. all the available configuration settings.
  14. .. _`configuration-settings`:
  15. Configuration settings
  16. ======================
  17. .. _`allowed_audio_domains`:
  18. allowed_audio_domains
  19. ---------------------
  20. * Default: ``null``
  21. If falsy, all domains are allowed. Set it to an array to specify a whitelist of allowed domains.
  22. .. _`allowed_image_domains`:
  23. allowed_image_domains
  24. ---------------------
  25. * Default: ``null``
  26. If falsy, all domains are allowed. Set it to an array to specify a whitelist of allowed domains.
  27. E.g. ``['imgur.com', 'imgbb.com']``
  28. .. _`allowed_video_domains`:
  29. allowed_video_domains
  30. ---------------------
  31. * Default: ``null``
  32. If falsy, all domains are allowed. Set it to an array to specify a whitelist of allowed domains.
  33. E.g. ``['imgur.com']``
  34. authentication
  35. --------------
  36. * Default: ``login``
  37. * Allowed values: `login`_, `external`, `anonymous`_, `prebind`_
  38. This option states the way Converse will authenticate.
  39. login
  40. ~~~~~
  41. The default means is ``login``, which means that the user either logs in manually with their
  42. username and password, or automatically if used together with `auto_login`_ set to ``true``
  43. and ``jid`` and ``password`` values.
  44. external
  45. ~~~~~~~~
  46. This setting will still show a login form and submit button, but the form will
  47. only contain an input for the user's JID, *not* for the password.
  48. That's because this setting is intended to be used when you are using
  49. SASL-EXTERNAL as authentication mechanism, in which case a password is usually
  50. not required.
  51. SASL-EXTERNAL is generally used together with x509 client certificates to
  52. enable passwordless login or 2-factor authentication.
  53. For more details on this, `read this blog post <https://opkode.com/blog/strophe_converse_sasl_external/>`_.
  54. anonymous
  55. ~~~~~~~~~
  56. This enables anonymous login if the XMPP server supports it. This option can be
  57. used together with `auto_login`_ to automatically and anonymously log a user in
  58. as soon as the page loads.
  59. The server's domain is passed in via the `jid`_ setting.
  60. .. _`prebind`:
  61. prebind
  62. ~~~~~~~
  63. See also: :ref:`session-support`
  64. Use this option when you want to attach to an existing XMPP
  65. `BOSH <https://en.wikipedia.org/wiki/BOSH>`_ session.
  66. Usually a BOSH session is set up server-side in your web app.
  67. Attaching to an existing BOSH session that was set up server-side is useful
  68. when you want to maintain a persistent single session for your users instead of
  69. requiring them to log in manually.
  70. When a BOSH session is initially created, you'll receive three tokens.
  71. A JID (jabber ID), SID (session ID) and RID (Request ID).
  72. Converse needs these tokens in order to attach to that same session.
  73. In addition to setting `authentication`_ to ``prebind``, you'll also need to
  74. set the `prebind_url`_ and `bosh-service-url`_.
  75. Here's an example of Converse being initialized with these options:
  76. .. code-block:: javascript
  77. converse.initialize({
  78. bosh_service_url: 'https://bind.example.com',
  79. jid: 'me@example.com',
  80. authentication: 'prebind',
  81. prebind_url: 'http://example.com/api/prebind',
  82. auto_login: true,
  83. allow_logout: false
  84. });
  85. allow_adhoc_commands
  86. --------------------
  87. * Default: ``true``
  88. Allows privileged users to run XEP-0050 Ad-Hoc commands via the settings modal.
  89. allow_bookmarks
  90. ---------------
  91. * Default: ``true``
  92. Enables/disables chatroom bookmarks functionality.
  93. This setting is only applicable if the ``converse-bookmarks`` plugin is loaded.
  94. See also: `allow_public_bookmarks`_
  95. allow_chat_pending_contacts
  96. ---------------------------
  97. * Default: ``false``
  98. Allow the user to chat with pending contacts.
  99. allow_contact_removal
  100. ---------------------
  101. * Default: ``true``
  102. Allow the user to remove roster contacts by clicking on the delete icon
  103. (i.e. trashcan) next to a contact's name in the roster.
  104. allow_contact_requests
  105. ----------------------
  106. * Default: ``true``
  107. Allow users to add one another as contacts. If this is set to false, the
  108. **Add a contact** widget, **Contact Requests** and **Pending Contacts** roster
  109. sections will all not appear. Additionally, all incoming contact requests will be
  110. ignored.
  111. allow_dragresize
  112. ----------------
  113. * Default: ``true``
  114. Allow users to resize chats by dragging the edges. The min-height and min-width
  115. CSS properties set on a chatboxes (specifically on the ``.chatbox > .box-flyout`` element)
  116. will be honored, IF they are set in pixels.
  117. allow_logout
  118. ------------
  119. * Default: ``true``
  120. Determines whether the user is allowed to log out. If set to ``false``, there will be no logout button.
  121. .. _`allow_message_corrections`:
  122. allow_message_corrections
  123. -------------------------
  124. * Default: ``'all'``
  125. * Possible values: ``'all'``, ``'last'``
  126. Configures the last message correction (LMC) feature of Converse. By default you can edit all of your own
  127. messages. Setting this to ``'last'`` will limit this feature to the message sent most recently as suggested by
  128. `XEP-0308: Last Message Correction <https://xmpp.org/extensions/xep-0308.html>`_.
  129. Setting it to anything else (including ``false``) will disable the ability to correct sent messages.
  130. allow_message_retraction
  131. ------------------------
  132. * Default: ``'all'``
  133. * Possible values: ``'all'``, ``'own'``, ``'moderator'`` or any falsy value
  134. Determines who is allowed to retract messages. If set to ``'all'``, then normal
  135. users may retract their own messages and ``'moderators'`` may retract the messages of
  136. other users.
  137. allow_message_styling
  138. ---------------------
  139. * Default: ``true``
  140. * Possible values: ``true``, ``false``
  141. Determines wehether support for XEP-0393 Message Styling hints are enabled or not.
  142. allow_muc_invitations
  143. ---------------------
  144. * Default: ``true``
  145. Allows users to be invited to join MUC chatrooms. An "Invite" widget will
  146. appear in the sidebar of the chatroom where you can type in the JID of a user
  147. to invite into the chatroom.
  148. .. _`allow_non_roster_messaging`:
  149. allow_non_roster_messaging
  150. --------------------------
  151. * Default: ``false``
  152. Determines whether you'll receive messages from users that are not in your
  153. roster. The XMPP specification allows for this (similar to email).
  154. Setting this to ``true`` increases your chances of receiving spam (when using a
  155. federated server), while setting it to ``false`` means that people not on your
  156. roster can't contact you unless one (or both) of you subscribe to one another's
  157. presence (i.e. adding as a roster contact).
  158. allow_public_bookmarks
  159. ----------------------
  160. * Default: ``false``
  161. Some XMPP servers don't support private PEP/PubSub nodes, as required for
  162. private bookmarks and outlined in `XEP-0223 <https://xmpp.org/extensions/xep-0223.html>`_.
  163. Even though Converse asks for the bookmarks to be kept private (via the
  164. `<publish-options>` XML node), the server simply ignores the privacy settings
  165. and publishes the node contents under the default privacy setting, which makes
  166. the information available to all roster contacts.
  167. If your XMPP server does not support `XEP-0223`'s ``#publish-options``
  168. feature and you don't mind that your room bookmarks are visible to all
  169. contacts, then you can set this setting to ``true``. Otherwise you won't be
  170. able to have any room bookmarks at all for an account on that XMPP server.
  171. allow_registration
  172. ------------------
  173. * Default: ``true``
  174. Support for `XEP-0077: In band registration <https://xmpp.org/extensions/xep-0077.html>`_
  175. Allow XMPP account registration showing the corresponding UI register form interface.
  176. allow_url_history_change
  177. ------------------------
  178. * Default: ``true``
  179. Allow Converse to change the browser url bar through the History API <https://developer.mozilla.org/en-US/docs/Web/API/History_API>.
  180. allow_user_trust_override
  181. -------------------------
  182. * Default: ``true``
  183. * Allowed values: ``true``, ``false``, ``off``
  184. This setting determines whether a user may decide whether
  185. Converse is ``trusted`` or not (e.g. in the particular browser).
  186. This is done via a *This is a trusted device* checkbox in the login form.
  187. If this setting is set to ``true`` or ``off``, the checkbox will be shown to the user, otherwise not.
  188. When this setting is set to ``true``, the checkbox will be checked by default.
  189. To not have it checked by default, set this setting to ``off``.
  190. If the user indicates that this device/browser is not trusted, then effectively
  191. it's the same as setting `clear_cache_on_logout`_ to ``true``
  192. and `persistent_store`_ to ``sessionStorage``.
  193. ``sessionStorage`` only persists while the current tab or window containing a Converse instance is open.
  194. As soon as it's closed, the data is cleared.
  195. The data that is cached (or cleared) includes your sent and received messages, which chats you had
  196. open, what features the XMPP server supports and what your online status was.
  197. Clearing the cache makes Converse much slower when the user logs in again, because all data needs to be fetch anew.
  198. archived_messages_page_size
  199. ---------------------------
  200. * Default: ``50``
  201. See also: `message_archiving`_
  202. This feature applies to `XEP-0313: Message Archive Management (MAM) <https://xmpp.org/extensions/xep-0313.html>`_
  203. and will only take effect if your server supports MAM.
  204. It allows you to specify the maximum amount of archived messages to be returned per query.
  205. When you open a chatbox or room, archived messages will be displayed (if
  206. available) and the amount returned will be no more than the page size.
  207. You will be able to query for even older messages by scrolling upwards in the chatbox or room
  208. (the so-called infinite scrolling pattern).
  209. autocomplete_add_contact
  210. ------------------------
  211. * Default: ``true``
  212. Determines whether search suggestions are shown in the "Add Contact" modal.
  213. auto_focus
  214. ----------
  215. * Default: ``true``
  216. If set to ``true``, the textarea for composing chat messages will automatically
  217. become focused as soon as a chat is opened. This means you don't need to click
  218. the textarea first before starting to type a message. This also applies to the
  219. username field which is automatically focused after the login controlbox is
  220. loaded.
  221. For applications where chat is not the main feature, automatic focus of the
  222. chat box might be undesired.
  223. auto_list_rooms
  224. ---------------
  225. * Default: ``false``
  226. If true, and the XMPP server on which the current user is logged in supports
  227. multi-user chat, then a list of rooms on that server will be fetched in the
  228. "Query for Groupchats" modal.
  229. Not recommended for servers with lots of chatrooms.
  230. For each room on the server a query is made to fetch further details (e.g.
  231. features, number of occupants etc.), so on servers with many rooms this
  232. option will create lots of extra connection traffic.
  233. If the `muc_domain`_ is locked with the `locked_muc_domain`_ setting, then
  234. rooms will automatically be fetched in the "Query for Groupchats" modal,
  235. regardless of the value of this setting.
  236. .. _`auto_login`:
  237. auto_login
  238. ----------
  239. * Default: ``false``
  240. This option can be used to let Converse automatically log the user in as
  241. soon as the page loads.
  242. If `authentication`_ is set to ``login``, then you will also need to provide a
  243. valid ``jid`` and ``password`` values, either manually by passing them in, or
  244. by the `credentials_url`_ setting. Setting a ``credentials_url`` is preferable
  245. to manually passing in ``jid`` and ``password`` values, because it allows
  246. better reconnection with `auto_reconnect`_. When the connection drops,
  247. Converse will automatically fetch new login credentials from the
  248. ``credentials_url`` and reconnect.
  249. If `authentication`_ is set to ``anonymous``, then you will also need to provide the
  250. server's domain via the `jid`_ setting.
  251. This is a useful setting if you'd like to create a custom login form in your
  252. website. You'll need to write some JavaScript to accept that custom form's
  253. login credentials, then you can pass those credentials (``jid`` and
  254. ``password``) to ``converse.initialize`` to start Converse and log the user
  255. in to their XMPP account.
  256. .. note::
  257. The interaction between ``keepalive`` and ``auto_login`` is unfortunately
  258. inconsistent depending on the `authentication`_ method used.
  259. If ``auto_login`` is set to ``false`` and `authentication`_ is set to
  260. ``anonymous``, ``external`` or ``prebind``, then Converse won't automatically
  261. log the user in.
  262. If `authentication`_ set to ``login`` the situation is much more
  263. ambiguous, since we don't have a way to distinguish between wether we're
  264. restoring a previous session (``keepalive``) or whether we're
  265. automatically setting up a new session (``auto_login``).
  266. So currently if EITHER ``keepalive`` or ``auto_login`` is ``true`` and
  267. `authentication`_ is set to ``login``, then Converse will try to log the user in.
  268. auto_away
  269. ---------
  270. * Default: ``0``
  271. The amount of seconds after which the user's presence status should
  272. automatically become ``away``.
  273. If the user's status is ``extended away``, it won't be changed to ``away``.
  274. If the given value is negative or ``0``, this option is disabled.
  275. auto_xa
  276. -------
  277. * Default: ``0``
  278. The amount of seconds after which the user's presence status should
  279. automatically become ``extended away``.
  280. If the value is negative or ``0``, the function is disabled.
  281. auto_reconnect
  282. --------------
  283. * Default: ``false``
  284. Automatically reconnect to the XMPP server if the connection drops
  285. unexpectedly.
  286. This option works best when you have `authentication`_ set to ``prebind`` and have
  287. also specified a ``prebind_url`` URL, from where Converse can fetch the BOSH
  288. tokens. In this case, Converse will automaticallly reconnect when the
  289. connection drops but also reestablish earlier lost connections (due to
  290. network outages, closing your laptop etc.).
  291. When `authentication`_ is set to `login`, then this option will only work when
  292. the page hasn't been reloaded yet, because then the user's password has been
  293. wiped from memory. This configuration can however still be useful when using
  294. Converse in desktop apps, for example those based on `CEF <https://bitbucket.org/chromiumembedded/cef>`_
  295. or `electron <http://electron.atom.io/>`_.
  296. auto_register_muc_nickname
  297. --------------------------
  298. * Default: ``false``
  299. * Allowed values: ``false``, ``true``, ``'unregister'``
  300. If truthy, Converse will automatically register a user's nickname upon entering
  301. a groupchat.
  302. See here fore more details: https://xmpp.org/extensions/xep-0045.html#register
  303. If set to ``'unregister'``, then the user's nickname will be registered
  304. (because it's a truthy value) and also be unregistered when the user
  305. permanently leaves the MUC by closing it.
  306. auto_subscribe
  307. --------------
  308. * Default: ``false``
  309. If true, the user will automatically subscribe back to any contact requests.
  310. auto_join_on_invite
  311. -------------------
  312. * Default: ``false``
  313. If true, the user will automatically join a chatroom on invite without any confirm.
  314. Also inviting users won't be prompted for a reason.
  315. auto_join_private_chats
  316. -----------------------
  317. * Default: ``[]``
  318. Allows you to provide a list of user JIDs for private (i.e. single) chats that
  319. should automatically be started upon login.
  320. For example::
  321. `['tom@example.org', 'dick@example.org', 'harry@example.org']`
  322. auto_join_rooms
  323. ---------------
  324. * Default: ``[]``
  325. This settings allows you to provide a list of groupchat conversations to be
  326. automatically joined once the user has logged in.
  327. You can either specify a simple list of room JIDs, in which case your nickname
  328. will be taken from your JID, or you can specify a list of maps, where each map
  329. specifies the room's JID and other options.
  330. For example::
  331. `[{'jid': 'room@example.org', 'nick': 'WizardKing69', 'minimized': true }]`
  332. blacklisted_plugins
  333. -------------------
  334. * Default: ``[]``
  335. A list of plugin names that are blacklisted and will therefore not be
  336. initialized once ``converse.initialize`` is called, even if the same plugin is
  337. whitelisted.
  338. From Converse 3.0 onwards most of the API is available only to plugins and
  339. all plugins need to be whitelisted first.
  340. The usecase for blacklisting is generally to disable removed core plugins
  341. (which are automatically whitelisted) to prevent other (potentially malicious)
  342. plugins from registering themselves under those names.
  343. The core, and by default whitelisted, plugins are::
  344. converse-bosh
  345. converse-bookmarks
  346. converse-chatboxes
  347. converse-chatview
  348. converse-controlbox
  349. converse-core
  350. converse-disco
  351. converse-dragresize
  352. converse-fullscreen
  353. converse-headline
  354. converse-mam
  355. converse-minimize
  356. converse-muc
  357. converse-muc-embedded
  358. converse-notification
  359. converse-ping
  360. converse-profile
  361. converse-register
  362. converse-roomslist
  363. converse-rosterview
  364. converse-singleton
  365. converse-smacks
  366. converse-spoilers
  367. converse-vcard
  368. Example:
  369. .. code-block:: javascript
  370. require(['converse-core', 'converse-muc-embedded'], function (converse) {
  371. converse.initialize({
  372. // other settings removed for brevity
  373. blacklisted_plugins: [
  374. 'converse-dragresize',
  375. 'converse-minimize'
  376. ],
  377. });
  378. });
  379. .. _`bosh-service-url`:
  380. bosh_service_url
  381. ----------------
  382. * Default: ``undefined``
  383. Example: ``http://xmpp.example.com:5280/bosh/``
  384. Example with reverse-proxy and TLS: ``https://xmpp.example.com/bosh/``
  385. To connect to an XMPP server over HTTP you need a `BOSH <https://en.wikipedia.org/wiki/BOSH>`_
  386. connection manager which acts as a middle man between the HTTP and XMPP
  387. protocols.
  388. The bosh_service_url setting takes the URL of a BOSH connection manager.
  389. Please refer to your XMPP server's documentation on how to enable BOSH.
  390. 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>`_
  391. A more modern alternative to BOSH is to use `websockets <https://developer.mozilla.org/en/docs/WebSockets>`_.
  392. Please see the :ref:`websocket-url` configuration setting.
  393. clear_cache_on_logout
  394. ---------------------
  395. * Default: ``false``
  396. If set to ``true``, all locally cached data will be cleared when the user logs out,
  397. regardless of the `persistent_store`_ being used (``localStorage``, ``IndexedDB`` or ``sessionStorage``).
  398. *Note*: If `allow_user_trust_override`_ is set to ``true`` and the user
  399. indicates that this device/browser is **not** trusted, then the cache will be
  400. cleared on logout, even if this setting is set to ``true``.
  401. *Note*: If this setting is set to ``true``, then OMEMO will be disabled, since
  402. otherwise it won't be possible to decrypt archived messages that were
  403. already decrypted previously (due to forward security).
  404. clear_messages_on_reconnection
  405. ------------------------------
  406. * Default: ``false``
  407. In some cases, it might be desirable to clear cached chat messages once you've
  408. reconnected to the XMPP server.
  409. For example, if you want to prevent the chat history from getting too long or
  410. if you want to avoid gaps in the chat history (for example due to MAM not
  411. returning all messages since the last cached message).
  412. Beware, if you're using OMEMO, then you probably don't want to set this setting to
  413. ``true``. OMEMO messages can be decrypted only once, so if they then
  414. subsequently get cleared, you won't get the plaintext back.
  415. chatstate_notification_blacklist
  416. --------------------------------
  417. * Default: ``[]``
  418. A list of JIDs to be ignored when showing desktop notifications of changed chat states.
  419. Some user's clients routinely connect and disconnect (likely on mobile) and
  420. each time a chat state notificaion is received (``online`` when connecting and
  421. then ``offline`` when disconnecting).
  422. When desktop notifications are turned on (see `show-desktop-notifications`_),
  423. then you'll receive notification messages each time this happens.
  424. Receiving constant notifications that a user's client is connecting and disconnecting
  425. is annoying, so this option allows you to ignore those JIDs.
  426. connection_options
  427. ------------------
  428. * Default: ``{}``
  429. * Type: Object
  430. Converse relies on `Strophe.js <http://strophe.im>`_ to establish and
  431. maintain a connection to the XMPP server.
  432. This option allows you to pass a map of configuration options to be passed into
  433. the ``Strophe.Connection`` constructor.
  434. For documentation on the configuration options that ``Strophe.Connection``
  435. accepts, refer to the
  436. `Strophe.Connection documentation <http://strophe.im/strophejs/doc/1.2.8/files/strophe-js.html#Strophe.Connection.Strophe.Connection>`_.
  437. Restricting the supported authentication mechanisms:
  438. ****************************************************
  439. As an example, suppose you want to restrict the supported SASL authentication
  440. mechanisms, then you'd pass in the ``mechanisms`` as a ``connection_options``
  441. ``key:value`` pair:
  442. .. code-block:: javascript
  443. converse.initialize({
  444. connection_options: {
  445. 'mechanisms': [
  446. converse.env.Strophe.SASLMD5,
  447. ]
  448. }
  449. });
  450. Running the XMPP Connection inside a shared worker
  451. **************************************************
  452. Newer versions of Strophe.js, support the ability to run the XMPP Connection
  453. inside a `shared worker <https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker>`_ that's shared
  454. between open tabs in the browser in which Converse is running (and which have the same domain).
  455. *Note:* This feature is experimental and there currently is no way to
  456. synchronize actions between tabs. For example, sent 1-on-1 messages aren't
  457. reflected by the server, so you if you send such a message in one tab, it won't
  458. appear in another.
  459. .. code-block:: javascript
  460. converse.initialize({
  461. connection_options: { 'worker': true }
  462. });
  463. .. _`credentials_url`:
  464. credentials_url
  465. ---------------
  466. * Default: ``null``
  467. * Type: URL
  468. This setting should be used in conjunction with `authentication`_ set to ``login``.
  469. It allows you to specify a URL which Converse will call when it needs to get
  470. the username and password (or authentication token) which Converse will use
  471. to automatically log the user in.
  472. If `auto_reconnect`_ is also set to ``true``, then Converse will automatically
  473. fetch new credentials from the ``credentials_url`` whenever the connection or
  474. session drops, and then attempt to reconnect and establish a new session.
  475. If the request to the ``credentials_url`` URL fails for whatever reason,
  476. Converse will continuously retry to fetch the credentials every 2 seconds.
  477. The server behind ``credentials_url`` should return a JSON encoded object::
  478. {
  479. "jid": "me@example.com/resource",
  480. "password": "Ilikecats!"
  481. }
  482. csi_waiting_time
  483. ----------------
  484. * Default: ``0``
  485. This option adds support for `XEP-0352 Client State Indication <https://xmpp.org/extensions/xep-0352.html>_`
  486. If Converse is idle for the configured amount of seconds, a chat state
  487. indication of ``inactive`` will be sent out to the XMPP server (if the server
  488. supports CSI).
  489. Afterwards, ss soon as there is any activity (for example, the mouse moves),
  490. a chat state indication of ``active`` will be sent out.
  491. A value of ``0`` means that this feature is disabled.
  492. .. _`loglevel`:
  493. loglevel
  494. --------
  495. * Default: ``'info'``
  496. * Allowed values: ``'debug'``, ``'info'``, ``'warn'``, ``'error'``, ``'fatal'``
  497. You can also set this value by changing a URL fragment `#converse?loglevel=debug`
  498. .. _`dark_theme`:
  499. dark_theme
  500. ----------
  501. * Default: ``'dracula'``
  502. The theme being used in dark mode.
  503. default_domain
  504. --------------
  505. * Default: ``undefined``
  506. Specify a domain to act as the default for user JIDs. This allows users to log
  507. in with only the username part of their JID, instead of the full JID.
  508. For example, if ``default_domain`` is ``example.org``, then the user
  509. ``johnny@example.org`` can log in with only ``johnny``.
  510. JIDs with other domains are still allowed but need to be provided in full.
  511. To specify only one domain and disallow other domains, see the `locked_domain`_
  512. option.
  513. default_state
  514. -------------
  515. * Default: ``'online'``
  516. The default chat status that the user wil have. If you for example set this to
  517. ``'chat'``, then Converse will send out a presence stanza with ``"show"``
  518. set to ``'chat'`` as soon as you've been logged in.
  519. discover_connection_methods
  520. ---------------------------
  521. * Default: ``true``
  522. Use `XEP-0156 <https://xmpp.org/extensions/xep-0156.html>`_ to discover whether
  523. the XMPP host for the current user advertises any Websocket or BOSH connection
  524. URLs that can be used.
  525. If this is set to ``false``, then a `websocket_url`_ or `bosh_service_url`_ need to be
  526. set.
  527. Currently only the XML encoded host-meta resource is supported as shown in
  528. `Example 2 under section 3.3 <https://xmpp.org/extensions/xep-0156.html#httpexamples>`_.
  529. domain_placeholder
  530. ------------------
  531. * Default: ``e.g. conversejs.org``
  532. The placeholder text shown in the domain input on the registration form.
  533. emoji_categories
  534. ----------------
  535. * Default:
  536. ::
  537. {
  538. "smileys": ":grinning:",
  539. "people": ":thumbsup:",
  540. "activity": ":soccer:",
  541. "travel": ":motorcycle:",
  542. "objects": ":bomb:",
  543. "nature": ":rainbow:",
  544. "food": ":hotdog:",
  545. "symbols": ":musical_note:",
  546. "flags": ":flag_ac:",
  547. "custom": ":converse:"
  548. }
  549. This setting lets you define the categories that are available in the emoji
  550. picker, as well as the default image that's shown for each category.
  551. The keys of the map are the categories and the values are the shortnames of the
  552. representative images.
  553. If you want to remove a category, don't just remove the key, instead set its
  554. value to ``undefined``.
  555. Due to restrictions intended to prevent addition of undeclared configuration
  556. settings, it's not possible to add new emoji categories. There is however a
  557. ``custom`` category where you can put your own custom emojis (also known as
  558. "stickers").
  559. To add custom emojis, you need to edit ``src/headless/emojis.json`` to add new
  560. entries to the map under the ``custom`` key.
  561. emoji_categories_label
  562. ----------------------
  563. * Default:
  564. ::
  565. {
  566. "smileys": "Smileys and emotions",
  567. "people": "People",
  568. "activity": "Activities",
  569. "travel": "Travel",
  570. "objects": "Objects",
  571. "nature": "Animals and nature",
  572. "food": "Food and drink",
  573. "symbols": "Symbols",
  574. "flags": "Flags",
  575. "custom": "Stickers"
  576. }
  577. This setting lets you pass in the text value that goes into the `title`
  578. attribute for the emoji categories. These strings will be translated, but for
  579. your custom text to be translatable, you'll need to wrap it in `__()``
  580. somewhere in your own code.
  581. emoji_image_path
  582. ----------------
  583. * Default: ``'https://twemoji.maxcdn.com/2/'``
  584. When `use_system_emojis`_ is set to ``false``, then this is the URL from where image files for
  585. displaying emojis will be fetched.
  586. enable_muc_push
  587. ---------------
  588. * Default: ``false``
  589. If true, then Converse will try to register
  590. `XEP-0357 push notification App Server(s) <https://xmpp.org/extensions/xep-0357.html#general-architecture>`_
  591. for the MUC domain of any newly entered groupchat.
  592. The app servers are specified with the `push_app_servers`_ option.
  593. .. note::
  594. Registering a push app server against a MUC domain is not (yet) standardized
  595. and this feature should be considered experimental.
  596. enable_smacks
  597. -------------
  598. * Default: ``false``
  599. Determines whether `XEP-0198 Stream Management <https://xmpp.org/extensions/xep-0198.html>`_
  600. support is turned on or not.
  601. Recommended to set to ``true`` if a websocket connection is used.
  602. Please see the :ref:`websocket-url` configuration setting.
  603. filter_by_resource
  604. ------------------
  605. * Default: ``false``
  606. Before version 1.0.3 Converse would ignore received messages if they were
  607. intended for a different resource then the current user had. It was decided to
  608. drop this restriction but leave it configurable.
  609. filter_url_query_params
  610. -----------------------
  611. * Default: ``null``
  612. Accepts a string or array of strings. Any query strings from URLs that match this setting will be removed.
  613. fullname
  614. --------
  615. If you are using prebinding, can specify the fullname of the currently
  616. logged in user, otherwise the user's vCard will be fetched.
  617. geouri_regex
  618. ------------
  619. * Default: ``/https:\/\/www.openstreetmap.org\/.*#map=[0-9]+\/([\-0-9.]+)\/([\-0-9.]+)\S*/g``
  620. Regular expression used to extract geo coordinates from links to openstreetmap.
  621. geouri_replacement
  622. ------------------
  623. * Default: ``'https://www.openstreetmap.org/?mlat=$1&mlon=$2#map=18/$1/$2'``
  624. String used to replace geo-URIs with. Ought to be a link to osm or similar. ``$1`` and ``$2`` is replaced by
  625. latitude and longitude respectively.
  626. hide_muc_participants
  627. ---------------------
  628. * Default: ``false``
  629. Option which allows you to hide the participants list by default.
  630. hide_offline_users
  631. ------------------
  632. * Default: ``false``
  633. If set to ``true``, then offline users aren't shown in the roster.
  634. hide_open_bookmarks
  635. -------------------
  636. * Default: ``false`` (``true`` when the `view_mode`_ is set to ``fullscreen``).
  637. This setting applies to the ``converse-bookmarks`` plugin and specfically the
  638. list of bookmarks shown in the ``Rooms`` tab of the control box.
  639. By default all bookmarks are shown in that list, if this setting is set to
  640. ``true``, then only bookmarks for rooms not currently open (i.e. that the
  641. current user hasn't joined), are shown.
  642. Makes sense to set this to ``true`` when also using the non-core
  643. ``converse-roomslist`` plugin, which shows a list of currently open (i.e.
  644. "joined") rooms.
  645. .. _`i18n`:
  646. i18n
  647. ----
  648. * Default: Auto-detection of the User/Browser language or ``en``;
  649. Specify the locale/language.
  650. The translations for that locale must be served in JSON format at `/dist/locales/${i18n}-LC_MESSAGES-converse-po.js`.
  651. The default webpack configuration for Converse.js ensures that these files are
  652. generated and placed in the right location.
  653. If an explicit locale is specified via the ``i18n`` setting and the
  654. translations for that locale are not found, then Converse will fall back to trying to determine the browser's language
  655. and fetching those translations, or if that fails the default English strings will be used.
  656. idle_presence_timeout
  657. ---------------------
  658. * Default: ``300``
  659. The amount of seconds after which the user is considered to be idle
  660. and an idle presence according to XEP-0319 is sent.
  661. If the given value is negative or ``0``, this feature is disabled.
  662. image_urls_regex
  663. ----------------
  664. * Default: ``null``
  665. 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``.
  666. If the image cannot be rendered, a hyperlink will be rendered instead.
  667. For example, to render Imgur images inline, you can use the following regex: ``/^https?:\/\/(?:www.)?(?:imgur\.com\/\w{7})\/?$/i``
  668. jid
  669. ---
  670. The Jabber ID or "JID" of the current user. The JID uniquely identifies a user
  671. on the XMPP network. It looks like an email address, but it's used for instant
  672. messaging instead.
  673. This value may be provided together with a ``password`` instead of supplying a
  674. `credentials_url`_ when setting ``auto_login`` to ``true``.
  675. .. _`keepalive`:
  676. keepalive
  677. ---------
  678. * Default: ``true``
  679. Determines whether Converse will attempt to keep you logged in across page loads.
  680. .. _`locales`:
  681. locales
  682. -------
  683. * Default:
  684. .. code-block:: javascript
  685. locales: [
  686. 'af', 'ca', 'de',
  687. 'es', 'en', 'fr',
  688. 'he', 'hu', 'id',
  689. 'it', 'ja', 'nb',
  690. 'nl', 'pl', 'pt_BR',
  691. 'ru', 'uk', 'zh'
  692. ]
  693. This setting restricts the locales that are supported by Converse and
  694. therefore what may be given as value for the :ref:`i18n` option.
  695. Any other locales will be ignored.
  696. locked_domain
  697. -------------
  698. * Default: ``undefined``
  699. Similar to `default_domain`_ but no other domains are allowed.
  700. For example, if ``locked_domain`` is set to ``example.org``, then the user
  701. ``johnny@example.org`` can log in with only ``johnny``.
  702. Additionally, only users registered on the ``example.org`` host can log in, no
  703. other users are allowed to log in.
  704. locked_muc_domain
  705. -----------------
  706. * Default: ``false``
  707. * Allowed values: ``false``, ``true``, ``'hidden'``
  708. By setting this value to something truthy, you restrict the multi-user chat (MUC) domain to only the value
  709. specified in `muc_domain`_.
  710. If the value is set to `'hidden'` (which is also truthy), then the MUC domain
  711. will not be shown to users.
  712. locked_muc_nickname
  713. -------------------
  714. * Default: ``false``
  715. This setting allows you to restrict the multi-user chat (MUC) nickname that a
  716. user uses to a particular value.
  717. Where the nickname value comes from depends on other settings.
  718. The `nickname`_ configuration setting takes precedence ahead of any other
  719. nickname value. If that's not set, then the "nickname" value from the user's
  720. VCard is taken, and if that is not set but `muc_nickname_from_jid`_ is set to
  721. ``true``, then the node of the user's JID (the part before the ``@``) is used.
  722. If no nickame value is found, then an error will be raised.
  723. mam_request_all_pages
  724. ---------------------
  725. * Default: ``true``
  726. When requesting messages from the archive, Converse will ask only for messages
  727. newer than the most recent cached message.
  728. When there are many archived messages since that one, the returned results will
  729. be broken up in to pages, set by `archived_messages_page_size`_.
  730. By default Converse will request all the pages until all messages have been
  731. fetched, however for large archives this can slow things down dramatically.
  732. This setting turns the paging off, and Converse will only fetch the latest
  733. page.
  734. .. note::
  735. If paging is turned off, there will appear gaps in the message history.
  736. Converse currently doesn't yet have a way to inform the user of these gaps or
  737. to let them be filled.
  738. muc_hats
  739. --------
  740. * Default: ``['xep317']``
  741. Since version 7 Converse now has rudimentary support for `XEP-0317 Hats <https://xmpp.org/extensions/xep-0317.html>`_.
  742. It is also possible to display VCard roles, MUC affiliation and MUC role along with hats.
  743. By default only XEP-0317 hats are considered.
  744. For the inclusion of VCard roles ``'vcard_roles'`` must be added to the list.
  745. For the inclusion of MUC affiliation and MUC role, the specific affiliations and roles
  746. to be used must be added to the list e.g. ``'owner','participant'``.
  747. Example:
  748. For XEP-0317 hats and VCard roles this setting should be set to:
  749. ``'muc_hats': ['xep317', 'vcard_roles']``
  750. For VCard roles, admin MUC affiliation and moderator MUC role:
  751. ``'muc_hats': ['vcard_roles', 'admin', 'moderator']``
  752. And to prevent the displaying of anything, an empty list must be used:
  753. ``'muc_hats': []``
  754. muc_mention_autocomplete_min_chars
  755. -----------------------------------
  756. * Default: ``0``
  757. The number of characters that need to be entered before the auto-complete list
  758. of matching nicknames is shown.
  759. muc_mention_autocomplete_filter
  760. -------------------------------
  761. * Default: ``contains``
  762. The method used for filtering MUC participants when using auto-complete.
  763. Valid values are ``contains`` and ``starts_with``.
  764. muc_mention_autocomplete_show_avatar
  765. ------------------------------------
  766. * Default: ``true``
  767. Show avatars of MUC participants when using auto-complete.
  768. message_archiving
  769. -----------------
  770. * Default: ``undefined``
  771. Provides support for `XEP-0313: Message Archive Management <https://xmpp.org/extensions/xep-0313.html>`_,
  772. whereby messages are archived in the XMPP server for later retrieval.
  773. Note, your XMPP server must support XEP-0313 MAM for this to work.
  774. This option sets the default archiving preference.
  775. Valid values are ``undefined``, ``never``, ``always`` and ``roster``.
  776. ``undefined`` means that any existing MAM configuration, as set by the user or
  777. the server administrator, will be used.
  778. ``roster`` means that only messages to and from JIDs in your roster will be
  779. archived. The other two values are self-explanatory.
  780. message_archiving_timeout
  781. -------------------------
  782. * Default: ``20000``
  783. The amount of time (in milliseconds) to wait when requesting archived messages
  784. from the XMPP server.
  785. Used in conjunction with ``message_archiving`` and in context of `XEP-0313: Message Archive Management <https://xmpp.org/extensions/xep-0313.html>`_.
  786. message_carbons
  787. ---------------
  788. * Default: ``true``
  789. Support for `XEP-0280: Message Carbons <https://xmpp.org/extensions/xep-0280.html>`_
  790. In order to keep all IM clients for a user engaged in a conversation,
  791. outbound messages are carbon-copied to all interested resources.
  792. This is especially important with Converse, where each browser
  793. tab serves as a separate IM client.
  794. XEP-0280 requires server support, so make sure that message carbons are enabled
  795. on your server.
  796. message_limit
  797. -------------
  798. * Default: ``0``
  799. Determines the allowed amount of characters in a chat message. A value of zero means there is no limit.
  800. Note, this limitation only applies to the Converse UX code running in the browser
  801. and it's trivial for an attacker to bypass this restriction.
  802. You should therefore also configure your XMPP server to limit message sizes.
  803. modtools_disable_assign
  804. -----------------------
  805. * Default: ``false``
  806. * Possible Values: ``true``, ``false``, ``['owner', 'admin', 'member', 'outcast', 'none', 'moderator', 'participant', 'visitor']``
  807. This setting allows you to disable (either completely, or fine-grained) which affiliations and or roles
  808. may be assigned in the moderator tools modal.
  809. modtools_disable_query
  810. ----------------------
  811. * Default: ``[]``
  812. * Possible Values: ``['owner', 'admin', 'member', 'outcast', 'none', 'moderator', 'participant', 'visitor']``
  813. This setting allows you to disable which affiliations or roles may be queried in the moderator tools modal.
  814. If all roles or all affiliations are disabled, then the relevant tab won't be
  815. showed at all.
  816. muc_clear_messages_on_leave
  817. ---------------------------
  818. * Default: ``true``
  819. Starting with Converse 8.0.0, when leaving a MUC, all cached messages in the history is cleared.
  820. Note: This means that you lose your history of decrypted OMEMO messages and cannot recover it.
  821. muc_disable_slash_commands
  822. --------------------------
  823. * Default: ``false``
  824. Allows you to disable the moderator commands such as ``/kick`` or ``/ban``.
  825. Ìf set to ``true`` all commands will be disabled.
  826. You can also selectively disable some moderator commands by setting it to an
  827. array of commands you don't want.
  828. The following example will disable 'mute' and 'voice' command:
  829. .. code-block:: javascript
  830. muc_disable_slash_commands: ['mute', 'voice'],
  831. muc_domain
  832. ----------
  833. * Default: ``undefined``
  834. The default MUC (multi-user chat) domain that should be used.
  835. When setting this value, users can only enter the name when opening a new MUC,
  836. and don't have to add the whole address (i.e. including the domain part).
  837. Users can however still enter the domain and they can still open MUCs with
  838. other domains.
  839. If you want to restrict MUCs to only this domain, then set `locked_muc_domain`_ to
  840. ``true``.
  841. muc_fetch_members
  842. -----------------
  843. * Default: ``true``
  844. * Possible values: Array containing any of the following: ``['member', 'admin', 'owner']``
  845. Determines whether Converse.js will fetch the member lists for a MUC
  846. (multi-user chat) when the user first enters it.
  847. Here's the relevant part from the MUC XEP: https://xmpp.org/extensions/xep-0045.html#getmemberlist
  848. The MUC service won't necessarily allow any user to fetch member lists,
  849. but can usually be configured to do so.
  850. The member lists consists of three lists of users who have the affiliations
  851. ``member``, ``admin`` and ``owner`` respectively.
  852. By fetching member lists, Converse.js will always show these users as
  853. participants of the MUC, giving them a permanent "presence" in the MUC.
  854. muc_history_max_stanzas
  855. -----------------------
  856. * Default: ``undefined``
  857. This option allows you to specify the maximum amount of messages to be shown in a
  858. chatroom when you enter it. By default, the amount specified in the room
  859. configuration or determined by the server will be returned.
  860. Please note, this option is not related to
  861. `XEP-0313 Message Archive Management <https://xmpp.org/extensions/xep-0313.html>`_,
  862. which also allows you to show archived chatroom messages, but follows a
  863. different approach.
  864. If you're using MAM for archiving chatroom messages, you might want to set
  865. this option to zero.
  866. muc_instant_rooms
  867. ------------------
  868. * Default: ``true``
  869. Determines whether 'instant' (also called 'dynamic' in OpenFire) rooms are created.
  870. Otherwise rooms first have to be configured before they're available to other
  871. users (so-called "registered rooms" in `MUC-0045 <https://xmpp.org/extensions/xep-0045.html#createroom>`_).
  872. From a UX perspective, if this settings is `false`, then a configuration form will
  873. render, that has to be filled in first, before the room can be joined by other
  874. users.
  875. muc_nickname_from_jid
  876. ---------------------
  877. * Default: ``false``
  878. When set to ``true``, then users will not be prompted to provide nicknames for
  879. chatrooms. Instead, the node part of a user's JID (i.e. JID = node@domain/resource)
  880. will be used. If the user's nickname is already taken by another user in the
  881. chatroom, then an integer will be added to make it unique.
  882. So, for example, if john@example.com joins a chatroom, his nickname will
  883. automatically be "john". If now john@differentdomain.com tries to join the
  884. room, his nickname will be "john-2", and if john@somethingelse.com joins, then
  885. his nickname will be "john-3", and so forth.
  886. muc_send_probes
  887. ---------------
  888. * Default: ``false``
  889. If set to ``true``, then whenever Converse receives a MUC message with an author for which we don't have
  890. any information (i.e. because that user is currently not in the MUC), then Converse will send out a ``<presence>``
  891. stanza of type ``probe`` in order to request the authors presence data.
  892. Prosody has support in `trunk` for this.
  893. The point of sending out presence probes is in order to receive
  894. presence-related metadata, such as `XEP-0317 Hats <https://xmpp.org/extensions/xep-0317.html>`_.
  895. .. note::
  896. 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>`_,
  897. few XMPP servers support this.
  898. .. note::
  899. If member lists are fetched via muc_fetch_members, then the occupants created
  900. based on those member lists won't be probed again later (given that the
  901. occupants are already created). Certain metadata like XEP-0317 hats are not
  902. included in the member lists, which means that this metadata will be missing for
  903. those occupants.
  904. muc_respect_autojoin
  905. --------------------
  906. * Default; ``true``
  907. Determines whether Converse will respect the autojoin-attribute of bookmarks. Per default
  908. all MUCs with set autojoin flag in their respective bookmarks will be joined on
  909. startup of Converse. When set to ``false`` no MUCs are automatically joined based on
  910. their bookmarks.
  911. muc_roomid_policy
  912. -----------------
  913. * Default: ``null``
  914. This option defines the regular expression that a room id must satisfy to allow the
  915. room creation. Server administrators may want to impose restrictions on the minimum
  916. and maximum length and the allowed character set allowed for room ids. Otherwise
  917. users might create rooms which are difficult to handle.
  918. However, restricting that on the server only leads to bad UX as users might learn of
  919. the servers policy only after they have tried to create a room. Furthermore error
  920. messages from XMPP-servers might not be self-explanatory.
  921. Therefore this option allows converse to already check the policy and disallow the
  922. user from even trying to entering/creating such a room.
  923. As this only makes sense on your own server, the check is applied only if the domain
  924. part equals `muc_domain`_. If `muc_domain`_ is unset, then this check is disabled
  925. completely.
  926. Example:
  927. .. code-block:: javascript
  928. muc_roomid_policy: /^[a-z0-9._-]{5,40}$/,
  929. See also: `muc_roomid_policy_hint`_
  930. muc_roomid_policy_hint
  931. ----------------------
  932. * Default: ``null``
  933. This option can be used in conjuction with `muc_roomid_policy`_ in order to give
  934. a written explanation of the imposed room id policy. You can use the html-tags
  935. ``<br>``, ``<b>``, and ``<em>`` to allow some basic styling.
  936. Example:
  937. .. code-block:: javascript
  938. 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>',
  939. muc_show_info_messages
  940. ----------------------
  941. * 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:
  942. .. code-block:: javascript
  943. converse.MUC_AFFILIATION_CHANGES_LIST = ['owner', 'admin', 'member', 'exowner', 'exadmin', 'exmember', 'exoutcast']
  944. converse.MUC_ROLE_CHANGES_LIST = ['op', 'deop', 'voice', 'mute'];
  945. converse.MUC_TRAFFIC_STATES_LIST = ['entered', 'exited'];
  946. converse.MUC_INFO_CODES = {
  947. 'visibility_changes': ['100', '102', '103', '172', '173', '174'],
  948. 'self': ['110'],
  949. 'non_privacy_changes': ['104', '201'],
  950. 'muc_logging_changes': ['170', '171'],
  951. 'nickname_changes': ['210', '303'],
  952. 'disconnect_messages': ['301', '307', '321', '322', '332', '333'],
  953. 'affiliation_changes': [...converse.AFFILIATION_CHANGES_LIST],
  954. 'join_leave_events': [...converse.MUC_TRAFFIC_STATES_LIST],
  955. 'role_changes': [...converse.MUC_ROLE_CHANGES_LIST],
  956. };
  957. This setting determines which info messages will Converse show inside a chatroom.
  958. It is recommended to use the aforementioned Converse object in the following fashion
  959. to build the list of desired info messages that will be shown:
  960. .. code-block:: javascript
  961. muc_show_info_messages: [
  962. ...converse.MUC_INFO_CODES.visibility_changes,
  963. ...converse.MUC_INFO_CODES.self,
  964. ...converse.MUC_INFO_CODES.non_privacy_changes,
  965. ...converse.MUC_INFO_CODES.muc_logging_changes,
  966. ...converse.MUC_INFO_CODES.nickname_changes,
  967. ...converse.MUC_INFO_CODES.disconnect_messages,
  968. ...converse.MUC_INFO_CODES.affiliation_changes,
  969. ...converse.MUC_INFO_CODES.join_leave_events,
  970. ...converse.MUC_INFO_CODES.role_changes,
  971. ]
  972. By default all info messages are shown.
  973. The behaviour of this setting is whitelisting, so if it is overriden all the desired
  974. events must be specified.
  975. If an empty list is provided, no info message will be displayed at all.
  976. muc_show_logs_before_join
  977. -------------------------
  978. * Default: ``false``
  979. If set to ``true``, when opening a MUC for the first time (or if you don't have
  980. a nickname configured for it), you'll see the message history (if the
  981. server supports `XEP-0313 Message Archive Management <https://xmpp.org/extensions/xep-0313.html>`_)
  982. and the nickname form at the bottom.
  983. muc_subscribe_to_rai
  984. --------------------
  985. * Default: ``false``
  986. This option enables support for `XEP-0437 Room Activity Indicators <https://xmpp.org/extensions/xep-0437.html>`_.
  987. When a MUC is no longer visible (specifically, when the ``hidden`` flag becomes ``true``),
  988. then Converse will exit the MUC and subscribe to activity indicators on the MUC host.
  989. When the MUC becomes visible again (``hidden`` gets set to ``false``), the MUC will be rejoined.
  990. .. _`nickname`:
  991. nickname
  992. --------
  993. * Default: ``undefined``
  994. This setting allows you to specify the nickname for the current user.
  995. The nickname will be included in presence requests to other users and will also
  996. be used as the default nickname when entering MUC chatrooms.
  997. This value will have first preference ahead of other nickname sources, such as
  998. the VCard ``nickname`` value.
  999. notify_all_room_messages
  1000. ------------------------
  1001. * Default: ``false``
  1002. By default, sound and desktop notifications will only be made when you are
  1003. mentioned in a room. If you set this setting to `true`, then you will be
  1004. notified of all messages received in a room.
  1005. You can also pass an array of room JIDs to this option, to only apply it to
  1006. certain rooms.
  1007. notification_delay
  1008. ------------------
  1009. * Default: ``5000``
  1010. Desktop notifications will be shown for a time of ``notification_delay``
  1011. ms. Setting this to ``0`` will make the notification stay until dismissed by
  1012. the user (requires browser support).
  1013. notification_icon
  1014. -----------------
  1015. * Default: ``'logo/conversejs-filled.svg'``
  1016. This option specifies which icon is shown in HTML5 notifications, as provided
  1017. by the ``src/converse-notification.js`` plugin.
  1018. notify_nicknames_without_references
  1019. -----------------------------------
  1020. * Default: ``false``
  1021. Enables notifications for nicknames in messages that don't have associated
  1022. XEP-0372 references linking them to the JID of the person being mentioned.
  1023. In Converse, these would be nicknames that weren't mentioned via the ``@`` sign.
  1024. oauth_providers
  1025. ---------------
  1026. * Default: ``[]``
  1027. Allows you to specify a list of OAuth providers that the user may use to log in
  1028. with.
  1029. .. note::
  1030. Your XMPP server will have to support Oauth logins
  1031. .. code-block:: javascript
  1032. converse.initialize({
  1033. oauth_providers: {
  1034. 'github': {
  1035. 'client_id': '1338d9f7ff52b1309b29',
  1036. 'host': 'chat.example.org',
  1037. 'class': 'fa-github-alt',
  1038. 'id': 'github',
  1039. 'name': 'Github'
  1040. },
  1041. 'twitter': {
  1042. 'client_id': '0332d98cff83b1999b22',
  1043. 'host': 'chat.example.org',
  1044. 'class': 'fa-twitter',
  1045. 'id': 'twitter',
  1046. 'name': 'Twitter'
  1047. }
  1048. },
  1049. });
  1050. omemo_default
  1051. -------------
  1052. * Default: ``false``
  1053. Use OMEMO encryption by default when the chat supports it.
  1054. ping_interval
  1055. -------------
  1056. * Default: ``60``
  1057. Make ping to server in order to keep connection with server killing sessions after idle timeout.
  1058. The ping are sent only if no messages are sent in the last ``ping_interval`` seconds
  1059. You need to set the value to any positive value to enable this functionality.
  1060. If you set this value to ``0`` or any negative value, il will disable this functionality.
  1061. .. _`play-sounds`:
  1062. play_sounds
  1063. -----------
  1064. * Default: ``false``
  1065. Plays a notification sound when you receive a personal message or when your
  1066. nickname is mentioned in a chatroom.
  1067. Inside the ``./sounds`` directory of the Converse repo you'll see MP3 and Ogg
  1068. formatted sound files. We need both, because neither format is supported by all browsers.
  1069. You can set the URL where the sound files are hosted with the `sounds_path`_ option.
  1070. Requires the `src/converse-notification.js` plugin.
  1071. .. _`prebind_url`:
  1072. prebind_url
  1073. -----------
  1074. * Default: ``null``
  1075. * Type: URL
  1076. See also: :ref:`session-support`
  1077. This setting should be used in conjunction with `authentication`_ set to `prebind`.
  1078. It allows you to specify a URL which Converse will call when it needs to get
  1079. the RID and SID (Request ID and Session ID) tokens of a BOSH connection, which
  1080. Converse will then attach to.
  1081. The server behind ``prebind_url`` should return a JSON encoded object with the
  1082. three tokens::
  1083. {
  1084. "jid": "me@example.com/resource",
  1085. "sid": "346234623462",
  1086. "rid": "876987608760"
  1087. }
  1088. priority
  1089. --------
  1090. * Default: ``0``
  1091. * Type: Number
  1092. Determines the priority used for presence stanzas sent out from this resource
  1093. (i.e. this instance of Converse).
  1094. The priority of a given XMPP chat client determines the importance of its presence
  1095. stanzas in relation to stanzas received from other clients of the same user.
  1096. In Converse, the indicated chat status of a roster contact will be taken from the
  1097. presence stanza (and associated resource) with the highest priority.
  1098. If multiple resources have the same top priority, then the chat status will be
  1099. taken from the most recent present stanza.
  1100. 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>`_.
  1101. providers_link
  1102. --------------
  1103. * Default: ``https://xmpp.net/directory.php``
  1104. The hyperlink on the registration form which points to a directory of public
  1105. XMPP servers.
  1106. .. _`assets_path`:
  1107. assets_path
  1108. -----------
  1109. * Default: ``'/dist/'`` or the `publicPath <https://webpack.js.org/guides/public-path/>`_ value as configured in the relevant Webpack configuration.
  1110. Since version 5.0.0, Converse serves a smaller bundle by extracting various
  1111. resources (for example emojis and translations) into separate files (aka
  1112. "chunks") which are loaded asynchronously on demand.
  1113. The URL path at which these resources are loaded is normally set by the ``publicPath``
  1114. setting of Webpack but this means that it's hardcoded to a particular value at
  1115. compile time.
  1116. This configuration seting allows this value to be set at runtime as well.
  1117. .. _persistent-store:
  1118. persistent_store
  1119. ----------------
  1120. * Default: ``IndexedDB``
  1121. * Valid options: ``localStorage``, ``IndexedDB``, ``sessionStorage``, ``BrowserExtLocal``, ``BrowserExtSync``
  1122. Determines which store is used for storing persistent data.
  1123. From version 6.0.0 onwards, Converse supports storing data in
  1124. `IndexedDB <https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Basic_Concepts_Behind_IndexedDB>`_.
  1125. IndexedDB is not subjected to the same space constraints as localStorage and is
  1126. also a requirement for progressive web apps which don't need persistent a
  1127. internet connectivity to be functional.
  1128. From version 7.0.0 onwards, Converse supports storing data in
  1129. `Browser Extension storage <https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage#Example_extensions>`_.
  1130. 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.
  1131. BrowserExtSync represents the sync storage area.
  1132. 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.
  1133. BrowserExtLocal represents the local storage area.
  1134. Items in local storage are local to the machine the extension was installed on
  1135. prune_messages_above
  1136. --------------------
  1137. * Default: ``undefined``
  1138. * Valid options: Any integer value above 0.
  1139. If this option is set to a positive integer, the chat history will be kept to
  1140. that number. As new messages come in, older messages will be deleted to
  1141. maintain the history size.
  1142. .. note::
  1143. When deleting locally stored decrypted OMEMO messages, you will **not** be
  1144. able to decrypt them again after fetching them from the server archive.
  1145. pruning_behavior
  1146. ----------------
  1147. * Default: ``unscrolled``
  1148. * Valid options: ``unscrolled``, ``scrolled``
  1149. By default the chat history will only be pruned when the chat window isn't
  1150. scrolled up (``'unscrolled'``).
  1151. If set to ``'scrolled'``, then pruning will also happen when the chat is
  1152. scrolled up. Be aware that this will interfere with MAM-based infinite
  1153. scrolling, and this setting only makes sense when infinite scrolling with MAM
  1154. is disabled.
  1155. push_app_servers
  1156. ----------------
  1157. * Default: ``[]``
  1158. This option lets you enable or disable so-called push notification "App Servers"
  1159. (as per `XEP-0357 <https://xmpp.org/extensions/xep-0357.html>`_).
  1160. For each "App Server" an object needs to be passed in. When enabling, you need
  1161. to specify ``jid`` and ``node`` values. You can also provide a
  1162. ``secret``, if required by your App Server.
  1163. When disabling, you need to specify at least a ``jid`` and set ``disabled`` to
  1164. ``true``. This will disable notifications to all pubsub nodes on that "App
  1165. Server". If you want to disable only a particular node, then specify a ``node``
  1166. value as well.
  1167. For example:
  1168. .. code-block:: javascript
  1169. converse.initialize({
  1170. 'push_app_servers': [{
  1171. 'jid': 'push-4@client.example',
  1172. 'node': 'yxs32uqsflafdk3iuqo',
  1173. 'disable': true
  1174. }, {
  1175. 'jid': 'push-5@client.example',
  1176. 'node': 'yxs32uqsflafdk3iuqo',
  1177. }]
  1178. });
  1179. registration_domain
  1180. -------------------
  1181. * Default: ``''``
  1182. Specify a domain name for which the registration form will be fetched automatically,
  1183. without the user having to enter any XMPP server domain name.
  1184. render_media
  1185. ------------
  1186. * Default: ``true``
  1187. * Possible values: ``true``, ``false`` or an array of domains for which media
  1188. should automatically be rendered.
  1189. If ``true``, media URLs (images, audio and video) will be rendered in the chat.
  1190. If ``false``, the URLs won't render as media, and instead only clickable links
  1191. will be shown.
  1192. Setting it to an array of domains means that media will be rendered only for URLs
  1193. matching those domains.
  1194. Media URLs are those URLs which appear to point to media files as well as URLs
  1195. for which `Open Graph Protocol (OGP) <https://modules.prosody.im/mod_ogp.html>`_
  1196. data was received (for example via Prosody's `mod_ogp <https://modules.prosody.im/mod_ogp.html>`_).
  1197. The OGP metadata must come from the MUC itself, metadata sent from participants
  1198. themselves will not be shown.
  1199. Based on the OGP metadata Converse will render a URL preview (also known as an
  1200. "unfurl").
  1201. .. note::
  1202. Note, even if this setting is ``false`` (or if the URL domain is not in the
  1203. array of allowed domains), a user can still click on the message
  1204. dropdown and click to show or hide the media for that particular message.
  1205. If you want to disable this ability, you can set the allowed domains for the
  1206. media type to an empty array.
  1207. See:
  1208. * `allowed_audio_domains`_
  1209. * `allowed_video_domains`_
  1210. * `allowed_image_domains`_
  1211. .. note::
  1212. This setting, together with the three allowed domain settings above, obsolete
  1213. the ``show_images_inline``, ``embed_audio`` and ``embed_videos`` settings.
  1214. .. _`roomconfig_whitelist`:
  1215. roomconfig_whitelist
  1216. --------------------
  1217. * Default: ``[]``
  1218. A list of room config-option names. If this list is non-empty, only the corresponding room
  1219. config-options will be shown in the room configuration form. The default will show all options.
  1220. In the following example the user can only see (and thus change) the roomname and nothing else:
  1221. .. code-block:: javascript
  1222. roomconfig_whitelist: ['muc#roomconfig_roomname'],
  1223. root
  1224. ----
  1225. * Default: ``window.document``
  1226. When using Converse inside a web component's shadow DOM, you will need to set this settings'
  1227. value to the shadow-root of the shadow DOM.
  1228. For example:
  1229. .. code-block:: javascript
  1230. class CustomChatComponent extends HTMLElement {
  1231. constructor() {
  1232. super();
  1233. const shadowRoot = this.attachShadow({mode: "open"});
  1234. this.initConverse(shadowRoot);
  1235. }
  1236. initConverse(shadowRoot) {
  1237. window.addEventListener("converse-loaded", function(event) {
  1238. const { converse } = event.detail;
  1239. converse.initialize({
  1240. root: shadowRoot,
  1241. // Other settings go here...
  1242. });
  1243. });
  1244. }
  1245. }
  1246. roster_groups
  1247. -------------
  1248. * Default: ``true``
  1249. If set to ``true``, Converse will show any roster groups you might have configured.
  1250. .. note::
  1251. It's currently not possible to use Converse to assign contacts to groups.
  1252. Converse can only show users and groups that were previously configured
  1253. elsewhere.
  1254. send_chat_state_notifications
  1255. -----------------------------
  1256. * Default: ``true``
  1257. * Allowed values: ``'active', 'composing', 'gone' 'inactive', 'paused'``
  1258. Determines whether chat state notifications (see `XEP-0085 <https://xmpp.org/extensions/xep-0085.html>`_) should be sent out or not.
  1259. Can also be set to an Array in order to allow only certain types of chat state notifications.
  1260. For example:
  1261. .. code-block:: javascript
  1262. converse.initialize({
  1263. 'send_chat_state_notifications': ['composing']
  1264. });
  1265. send_chat_markers
  1266. -----------------
  1267. * Default: ``['received', 'displayed', 'acknowledged']``
  1268. Determines which (if any) of the `XEP-0333 <https://xmpp.org/extensions/xep-0333.html>`_ chat markers will be sent out.
  1269. It's still up to Converse to decide when to send out the relevant markers, the
  1270. purpose of this setting is merely to turn on or off the sending of the
  1271. individual markers.
  1272. show_chat_state_notifications
  1273. -----------------------------
  1274. * Default: ``false``
  1275. Specifies whether chat state (online, dnd, away) HTML5 desktop notifications should be shown.
  1276. show_client_info
  1277. ----------------
  1278. * Default: ``true``
  1279. Specifies whether the info icon is shown on the controlbox which when clicked opens an
  1280. "About" modal with more information about the version of Converse being used.
  1281. show_connection_url_input
  1282. -------------------------
  1283. * Default: ``false``
  1284. Determines whether the login form should show an input element where the user
  1285. can enter the connection URL. If it's a websocket url, then upon form
  1286. submission the `websocket_url`_ setting will be updated with this value, and if
  1287. it's an HTTP URL then the `bosh_service_url`_ setting will be updated.
  1288. show_controlbox_by_default
  1289. --------------------------
  1290. * Default: ``false`` (``true`` when the `view_mode`_ is set to ``fullscreen``)
  1291. The "controlbox" refers to the special chatbox containing your contacts roster,
  1292. status widget, chatrooms and other controls.
  1293. By default this box is hidden and can be toggled by clicking on any element in
  1294. the page with class *toggle-controlbox*.
  1295. If this options is set to true, the controlbox will by default be shown upon
  1296. page load.
  1297. However, be aware that even if this value is set to ``false``, if the
  1298. controlbox is open, and the page is reloaded, then it will stay open on the new
  1299. page as well.
  1300. .. _`show-desktop-notifications`:
  1301. show_desktop_notifications
  1302. --------------------------
  1303. * Default: ``true``
  1304. Should HTML5 desktop notifications be shown?
  1305. If set to ``true``, notifications will be shown in the following cases:
  1306. * the browser is not visible nor focused and a private message is received.
  1307. * the browser is not visible nor focused and a groupchat message is received which mentions you.
  1308. * ``auto_subscribe`` is set to ``false`` and a new contact request is received.
  1309. If set to ``all``, notifications will be shown even if the above conditions are
  1310. not fulfilled.
  1311. Requires the `src/converse-notification.js` plugin.
  1312. show_message_avatar
  1313. -------------------
  1314. * Default: ``true``
  1315. Whether chat messages should also render the author's avatar.
  1316. show_images_inline
  1317. ------------------
  1318. * Default: ``true``
  1319. If set to ``false``, images won't be rendered in chats, instead only their links will be shown.
  1320. Users will however still have the ability to render individual images via the message actions dropdown.
  1321. If you want to disallow users from doing so, set the ``allowed_image_domains`` option to an empty array ``[]``.
  1322. show_retraction_warning
  1323. -----------------------
  1324. * Default: ``true``
  1325. From `XEP-0424: Message Retraction <https://xmpp.org/extensions/xep-0424.html>`_:
  1326. ::
  1327. Due to the federated and extensible nature of XMPP it's not possible to remove a message with
  1328. full certainty and a retraction can only be considered an unenforceable request for such removal.
  1329. Clients which don't support message retraction are not obligated to enforce the request and
  1330. people could have seen or copied the message contents already.
  1331. By default Converse shows a warning to users when they retract a message, to
  1332. inform them that they don't have a guarantee that the message will be removed
  1333. everywhere.
  1334. This warning isn't applicable to all deployments of Converse and can therefore
  1335. be turned off by setting this config variable to ``false``.
  1336. show_send_button
  1337. ----------------
  1338. * Default: ``true``
  1339. Adds a button to the chat which can be clicked or tapped in order to send the
  1340. message.
  1341. show_tab_notifications
  1342. ----------------------
  1343. * Default: ``true``
  1344. Determines whether an unread messages counter is shown in the tab.
  1345. singleton
  1346. ---------
  1347. * Default: ``false``
  1348. If set to ``true``, then only one chat (one-on-one or groupchat) will be allowed.
  1349. The chat must be specified with the `auto_join_rooms`_ or `auto_join_private_chats`_ options.
  1350. This setting is useful together with `view_mode`_ set to ``embedded``, when you
  1351. want to embed a chat into the page.
  1352. Alternatively you could use it with `view_mode`_ set to ``overlayed`` to create
  1353. a single helpdesk-type chat.
  1354. smacks_max_unacked_stanzas
  1355. --------------------------
  1356. * Default: ``5``
  1357. This setting relates to `XEP-0198 <https://xmpp.org/extensions/xep-0198.html>`_
  1358. and determines the number of stanzas to be sent before Converse will ask the
  1359. server for acknowledgement of those stanzas.
  1360. sounds_path
  1361. -----------
  1362. * Default: ``${assets_path}/sounds/``
  1363. This option only makes sense in conjunction with the `play_sounds`_ option and
  1364. specifies the URL of the sound files to be played (exluding the file names
  1365. themselves).
  1366. In order to support all browsers we need both an MP3 and an Ogg file. Make sure
  1367. to name your files ``msg_received.ogg`` and ``msg_received.mp3``.
  1368. sticky_controlbox
  1369. -----------------
  1370. * Default: ``false`` (``true`` when the ``view_mode`` is set to ``fullscreen``).
  1371. If set to ``true``, the control box (which includes the login, registration,
  1372. contacts and rooms tabs) will not be closeable. It won't have a close button at
  1373. all.
  1374. The idea behind this setting is to provide a better experience on mobile
  1375. devices when the intent is to use Converse as a web app. In this case
  1376. it doesn't make sense to close the control box, as there's often then nothing
  1377. "behind" it that's relevant to the user.
  1378. .. _`strict_plugin_dependencies`:
  1379. strict_plugin_dependencies
  1380. --------------------------
  1381. * Default: ``false``
  1382. When set to ``true`` and a plugin tries to override an object which doesn't
  1383. exist (for example because the plugin which provides that object is not
  1384. loaded), then an error will be raised.
  1385. Otherwise a message will simply be logged and the override instruction ignored.
  1386. The Converse plugins architecture can have an :ref:`dependencies`
  1387. plugin attribute. This enables you to specify an array of other plugins which
  1388. this one depends on.
  1389. Converse (more specifically, `pluggable.js <https://jcbrand.github.io/pluggable.js/>`_)
  1390. will first load these dependencies before executing the plugin's overrides and
  1391. calling its ``initialize`` method.
  1392. This is especially important if you register event handlers in your plugin for
  1393. events that fire in other plugins. In this case, you want to specify those
  1394. other plugins as dependencies.
  1395. If ``strict_plugin_dependencies`` is set to ``false``, an error won't be raised
  1396. if the optional dependencies aren't found.
  1397. synchronize_availability
  1398. ------------------------
  1399. * Default: ``true``
  1400. * Valid options: ``true``, ``false``, ``a resource name``.
  1401. This option lets you synchronize your chat status (`online`, `busy`, `away`) with other chat clients. In other words,
  1402. if you change your status to ``busy`` in a different chat client, your status will change to ``busy`` in Converse as well.
  1403. If set to ``true``, Converse will synchronize with all other clients you are logged in with.
  1404. If set to ``false``, this feature is disabled.
  1405. If set to ``a resource name``, Converse will synchronize only with a client that has that particular resource assigned to it.
  1406. .. _`theme`:
  1407. theme
  1408. -----
  1409. * Default: ``default``
  1410. * Valid options: ``default``, ``concord``, ``dracula``
  1411. Let's you set a color theme for Converse.
  1412. time_format
  1413. -----------
  1414. * Default: ``HH:mm``
  1415. Examples: ``HH:mm``, ``hh:mm``, ``hh:mm a``.
  1416. This option makes the time format for the time shown, for each message, configurable. Converse uses `DayJS <https://github.com/iamkun/dayjs>`_
  1417. for showing time. This option allows the configuration of the format in which ``DayJS`` will display the time for the messages. For detailed
  1418. description of time-format options available for ``DayJS`` you can check the
  1419. `default formatting options <https://github.com/iamkun/dayjs/blob/dev/docs/en/API-reference.md#displaying>`_ and the
  1420. `advanced options <https://github.com/iamkun/dayjs/blob/master/docs/en/Plugin.md#advancedformat>`_.
  1421. use_system_emojis
  1422. -----------------
  1423. * Default: ``true``
  1424. Determines whether emojis should be rendered by the user's system.
  1425. Not all operating systems support (all) emojis. So alternatively you can let
  1426. Converse render the emojis with `Twemoji <https://twemoji.twitter.com/>`_.
  1427. See also `emoji_image_path`_.
  1428. visible_toolbar_buttons
  1429. -----------------------
  1430. * Default:
  1431. .. code-block:: javascript
  1432. {
  1433. call: false,
  1434. spoiler: false,
  1435. emoji: true,
  1436. toggle_occupants: true
  1437. }
  1438. Allows you to show or hide buttons on the chatboxes' toolbars.
  1439. * *call*:
  1440. Provides a button with a picture of a telephone on it.
  1441. When the call button is pressed, it will emit an event that can be used by a third-party library to initiate a call.
  1442. .. code-block:: javascript
  1443. converse.listen.on('callButtonClicked', function(data) {
  1444. console.log('Strophe connection is', data.connection);
  1445. console.log('Bare buddy JID is', data.model.get('jid'));
  1446. // ... Third-party library code ...
  1447. });
  1448. * *emoji*:
  1449. Enables rendering of emoji and provides a toolbar button for choosing them.
  1450. * *spoiler*:
  1451. Shows a button for showing`XEP-0382 <https://xmpp.org/extensions/xep-0382.html>`_ spoiler messages.
  1452. * *toggle_occupants*:
  1453. Shows a button for toggling (i.e. showing/hiding) the list of occupants in a chatroom.
  1454. .. _`websocket-url`:
  1455. websocket_url
  1456. -------------
  1457. * Default: ``undefined``
  1458. Example: ``ws://xmpp.example.com:5280/ws/``
  1459. Example with reverse-proxy and TLS: ``wss://xmpp.example.com/ws/``
  1460. This option is used to specify a
  1461. `websocket <https://developer.mozilla.org/en/docs/WebSockets>`_ URI to which
  1462. Converse can connect to.
  1463. Websockets provide a more modern and effective two-way communication protocol
  1464. between the browser and a server, effectively emulating TCP at the application
  1465. layer and therefore overcoming many of the problems with existing long-polling
  1466. techniques for bidirectional HTTP (such as `BOSH <https://en.wikipedia.org/wiki/BOSH>`_).
  1467. Please refer to your XMPP server's documentation on how to enable websocket
  1468. support.
  1469. .. _`view_mode`:
  1470. view_mode
  1471. ---------
  1472. * Default: ``overlayed``
  1473. * Allowed values: ``overlayed``, ``fullscreen``, ``mobile``, ``embedded``
  1474. The ``view_mode`` setting configures Converse's mode and resulting behavior.
  1475. * ``overlayed`` is the original mode, in which the chats appeared as small boxes overlaying a webpage which can contain arbitrary content.
  1476. * ``fullscreen`` is for a fullpage and single-page app.
  1477. * ``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.
  1478. * ``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.
  1479. .. note::
  1480. Before the introduction of this setting (in version 3.3.0), there were there
  1481. different builds, each for the different modes.
  1482. These were:
  1483. * ``converse-mobile.js`` for the ``mobile`` mode
  1484. * ``converse-muc-embedded.js`` for embedding a single MUC room into a DOM element with id ``conversejs``
  1485. * ``converse.js`` for the ``overlayed`` mode
  1486. * ``inverse.js`` for the ``fullscreen`` mode
  1487. Besides having different builds, certain plugins had to be whitelisted
  1488. and blacklisted for the different modes.
  1489. ``converse-singleton`` had to be whitelisted for the ``mobile`` and ``fullscreen``
  1490. modes, additionally ``converse-inverse`` had to be whitelisted for the
  1491. ``fullscreen`` mode.
  1492. For both those modes the ``converse-minimize`` and ``converse-dragresize``
  1493. plugins had to be blacklisted.
  1494. When using ``converse-muc-embedded.js`` various plugins also had to manually be
  1495. blacklisted.
  1496. Since version 3.3.0 it's no longer necessary to blacklist any plugins (except
  1497. for ``converse-muc-embedded.js``, which is from version 3.3.3).
  1498. Blacklisting now happens automatically.
  1499. Since version 3.3.0, the ``inverse.js`` and ``converse-mobile.js`` builds no
  1500. longer exist. Instead the standard ``converse.js`` build is used, together with
  1501. the appropriate ``view_mode`` value.
  1502. Since version 4.0.0, there is now also only one CSS file to be used for all
  1503. the different view modes, ``converse.css``.
  1504. The ``converse-muc-embedded.js`` build can still be built, because it's smaller
  1505. than ``converse.js`` due to unused code being removed. It doesn't however contain
  1506. any new code, so the full ``converse.js`` build could be used instead, as long
  1507. as ``view_mode`` is set to ``embedded``.
  1508. Furthermore, it's no longer necessary to whitelist or blacklist any plugins
  1509. when switching view modes.
  1510. .. _`whitelisted_plugins`:
  1511. whitelisted_plugins
  1512. -------------------
  1513. * Default: ``[]``
  1514. A list of plugin names that are whitelisted and will therefore be
  1515. initialized once ``converse.initialize`` is called.
  1516. From Converse 3.0 onwards most of the API is available only to plugins and
  1517. all plugins need to be whitelisted first.
  1518. This is done to prevent malicious scripts from using the API to trick users or
  1519. to read their conversations.
  1520. By default all the core plugins are already whitelisted.
  1521. These are::
  1522. converse-bookmarks
  1523. converse-chatboxes
  1524. converse-chatview
  1525. converse-controlbox
  1526. converse-core
  1527. converse-disco
  1528. converse-dragresize
  1529. converse-fullscreen
  1530. converse-headline
  1531. converse-mam
  1532. converse-minimize
  1533. converse-muc
  1534. converse-muc-embedded
  1535. converse-notification
  1536. converse-ping
  1537. converse-profile
  1538. converse-register
  1539. converse-roomslist
  1540. converse-rosterview
  1541. converse-singleton
  1542. converse-spoilers
  1543. converse-vcard'
  1544. .. note::
  1545. If you are using a custom build which excludes some core plugins, then you
  1546. should blacklist them so that malicious scripts can't register their own
  1547. plugins under those names. See `blacklisted_plugins`_ for more info.
  1548. Example:
  1549. .. code-block:: javascript
  1550. require(['converse-core', 'converse-muc-embedded'], function (converse) {
  1551. converse.initialize({
  1552. // other settings removed for brevity
  1553. whitelisted_plugins: ['myplugin']
  1554. });
  1555. });
  1556. xhr_user_search_url
  1557. -------------------
  1558. .. note::
  1559. XHR stands for XMLHTTPRequest, and is meant here in the AJAX sense (Asynchronous JavaScript and XML).
  1560. * Default: ``null``
  1561. There are two ways to add users.
  1562. * The user inputs a valid JID (Jabber ID, aka XMPP address), and the user is added as a pending contact.
  1563. * The user inputs some text (for example part of a first name or last name),
  1564. an XHR (Ajax Request) will be made to a remote server, and a list of matches are returned.
  1565. The user can then choose one of the matches to add as a contact.
  1566. By providing an XHR search URL, you're enabling the second mechanism.
  1567. *What is expected from the remote server?*
  1568. A default JSON encoded list of objects must be returned. Each object
  1569. corresponds to a matched user and needs the keys ``jid`` and ``fullname``.
  1570. .. code-block:: javascript
  1571. [{"jid": "marty@mcfly.net", "fullname": "Marty McFly"}, {"jid": "doc@brown.com", "fullname": "Doc Brown"}]
  1572. .. note::
  1573. Make sure your server script sets the header `Content-Type: application/json`.
  1574. This is the URL to which an XHR GET request will be made to fetch user data from your remote server.
  1575. The query string will be included in the request with ``q`` as its key.
  1576. The data returned must be a JSON encoded list of user JIDs.
  1577. .. note::
  1578. Converse will construct the XHR get URL by simply appending
  1579. ``q=<query string entered>`` to the URL given by ``xhr_user_search_url``.
  1580. It is therefore important that the necessary question mark (``?``) preceding the
  1581. URL's query component or necessary delimiters (``&``) are included. See valid
  1582. examples below.
  1583. Examples:
  1584. .. code-block:: javascript
  1585. xhr_user_search_url: 'https://some.url/some_path?',
  1586. xhr_user_search_url: 'https://some.url/some_path?api_key=somekey&',