Mercurial > prosody-modules
comparison mod_conversejs/mod_conversejs.lua @ 5650:0eb2d5ea2428
merge
| author | Stephen Paul Weber <singpolyma@singpolyma.net> |
|---|---|
| date | Sat, 06 May 2023 19:40:23 -0500 |
| parents | 079ca766193b |
| children | 1c8197075d04 |
comparison
equal
deleted
inserted
replaced
| 5649:2c69577b28c2 | 5650:0eb2d5ea2428 |
|---|---|
| 77 js_template = render("console.log(\"mod_{module} could not read the JS template: %s\", {error|json})", | 77 js_template = render("console.log(\"mod_{module} could not read the JS template: %s\", {error|json})", |
| 78 { module = module.name, filename = template_filename, error = err }); | 78 { module = module.name, filename = template_filename, error = err }); |
| 79 end | 79 end |
| 80 end | 80 end |
| 81 | 81 |
| 82 local user_options = module:get_option("conversejs_options"); | 82 local function get_converse_options() |
| 83 local user_options = module:get_option("conversejs_options"); | |
| 83 | 84 |
| 84 local function get_converse_options() | |
| 85 local allow_registration = module:get_option_boolean("allow_registration", false); | 85 local allow_registration = module:get_option_boolean("allow_registration", false); |
| 86 local converse_options = { | 86 local converse_options = { |
| 87 -- Auto-detected connection endpoints | 87 -- Auto-detected connection endpoints |
| 88 bosh_service_url = has_bosh and module:http_url("bosh","/http-bind") or nil; | 88 bosh_service_url = has_bosh and module:http_url("bosh","/http-bind") or nil; |
| 89 websocket_url = has_ws and module:http_url("websocket","xmpp-websocket"):gsub("^http", "ws") or nil; | 89 websocket_url = has_ws and module:http_url("websocket","xmpp-websocket"):gsub("^http", "ws") or nil; |
