Converse converse.js

Source: headless/shared/settings/constants.js

  1. /**
  2. * @typedef { Object } ConfigurationSettings
  3. * Converse's core configuration values
  4. * @property { Boolean } [allow_non_roster_messaging=false]
  5. * @property { Boolean } [allow_url_history_change=true]
  6. * @property { String } [assets_path='/dist']
  7. * @property { ('login'|'prebind'|'anonymous'|'external') } [authentication='login']
  8. * @property { Boolean } [auto_login=false] - Currently only used in connection with anonymous login
  9. * @property { Boolean } [reuse_scram_keys=false] - Save SCRAM keys after login to allow for future auto login
  10. * @property { Boolean } [auto_reconnect=true]
  11. * @property { Array<String>} [blacklisted_plugins]
  12. * @property { Boolean } [clear_cache_on_logout=false]
  13. * @property { Object } [connection_options]
  14. * @property { String } [credentials_url] - URL from where login credentials can be fetched
  15. * @property { Boolean } [discover_connection_methods=true]
  16. * @property { RegExp } [geouri_regex]
  17. * @property { RegExp } [geouri_replacement='https://www.openstreetmap.org/?mlat=$1&mlon=$2#map=18/$1/$2']
  18. * @property { String } [i18n]
  19. * @property { String } [jid]
  20. * @property { Boolean } [keepalive=true]
  21. * @property { ('debug'|'info'|'eror') } [loglevel='info']
  22. * @property { Array<String> } [locales]
  23. * @property { String } [nickname]
  24. * @property { String } [password]
  25. * @property { ('IndexedDB'|'localStorage') } [persistent_store='IndexedDB']
  26. * @property { String } [rid]
  27. * @property { Element } [root=window.document]
  28. * @property { String } [sid]
  29. * @property { Boolean } [singleton=false]
  30. * @property { Boolean } [strict_plugin_dependencies=false]
  31. * @property { ('overlayed'|'fullscreen'|'mobile') } [view_mode='overlayed']
  32. * @property { String } [websocket_url]
  33. * @property { Array<String>} [whitelisted_plugins]
  34. */
  35. export const DEFAULT_SETTINGS = {
  36. allow_non_roster_messaging: false,
  37. allow_url_history_change: true,
  38. assets_path: '/dist',
  39. authentication: 'login', // Available values are "login", "prebind", "anonymous" and "external".
  40. auto_login: false, // Currently only used in connection with anonymous login
  41. reuse_scram_keys: false,
  42. auto_reconnect: true,
  43. blacklisted_plugins: [],
  44. clear_cache_on_logout: false,
  45. connection_options: {},
  46. credentials_url: null, // URL from where login credentials can be fetched
  47. discover_connection_methods: true,
  48. geouri_regex: /https\:\/\/www.openstreetmap.org\/.*#map=[0-9]+\/([\-0-9.]+)\/([\-0-9.]+)\S*/g,
  49. geouri_replacement: 'https://www.openstreetmap.org/?mlat=$1&mlon=$2#map=18/$1/$2',
  50. i18n: undefined,
  51. jid: undefined,
  52. keepalive: true,
  53. loglevel: 'info',
  54. locales: [
  55. 'af',
  56. 'ar',
  57. 'bg',
  58. 'ca',
  59. 'cs',
  60. 'da',
  61. 'de',
  62. 'el',
  63. 'en',
  64. 'eo',
  65. 'es',
  66. 'eu',
  67. 'fa',
  68. 'fi',
  69. 'fr',
  70. 'gl',
  71. 'he',
  72. 'hi',
  73. 'hu',
  74. 'id',
  75. 'it',
  76. 'ja',
  77. 'lt',
  78. 'mr',
  79. 'nb',
  80. 'nl',
  81. 'oc',
  82. 'pl',
  83. 'pt',
  84. 'pt_BR',
  85. 'ro',
  86. 'ru',
  87. 'sv',
  88. 'th',
  89. 'tr',
  90. 'ug',
  91. 'uk',
  92. 'vi',
  93. 'zh_CN',
  94. 'zh_TW',
  95. ],
  96. nickname: undefined,
  97. password: undefined,
  98. persistent_store: 'IndexedDB',
  99. rid: undefined,
  100. root: window.document,
  101. sid: undefined,
  102. singleton: false,
  103. strict_plugin_dependencies: false,
  104. stanza_timeout: 20000,
  105. view_mode: 'overlayed', // Choices are 'overlayed', 'fullscreen', 'mobile'
  106. websocket_url: undefined,
  107. whitelisted_plugins: [],
  108. };