# HG changeset patch # User Kim Alvefur # Date 1602785524 -7200 # Node ID 37aa50ed79c161d1c2901f95fafa631978b6cccb # Parent b74d6a3f0c3f07aed5959a7546c77b62f3df7461 mod_conversejs: Add comments about default settings diff -r b74d6a3f0c3f -r 37aa50ed79c1 mod_conversejs/mod_conversejs.lua --- a/mod_conversejs/mod_conversejs.lua Thu Oct 15 20:11:15 2020 +0200 +++ b/mod_conversejs/mod_conversejs.lua Thu Oct 15 20:12:04 2020 +0200 @@ -84,19 +84,29 @@ local function get_converse_options() local allow_registration = module:get_option_boolean("allow_registration", false); local converse_options = { + -- Auto-detected connection endpoints bosh_service_url = has_bosh and module:http_url("bosh","/http-bind") or nil; websocket_url = has_ws and module:http_url("websocket","xmpp-websocket"):gsub("^http", "ws") or nil; - authentication = module:get_option_string("authentication") == "anonymous" and "anonymous" or "login"; + -- Since we provide those, XEP-0156 based auto-discovery should not be used discover_connection_methods = false; + -- Authentication mode to use (normal or guest login) + authentication = module:get_option_string("authentication") == "anonymous" and "anonymous" or "login"; + -- Host to connect to for anonymous access jid = module.host; + -- Let users login with only username default_domain = module.host; domain_placeholder = module.host; + -- If registration is enabled allow_registration = allow_registration; + -- and if it is, which domain to register with registration_domain = allow_registration and module.host or nil; + -- Path to resources like emoji, icons, sounds assets_path = cdn_url..version.."/dist/"; + -- Default most suited for use as a "normal" client view_mode = "fullscreen"; }; + -- Let config override the above defaults if type(user_options) == "table" then for k,v in pairs(user_options) do converse_options[k] = v;