configuration.rst 75 KB

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