# HG changeset patch # User Kim Alvefur # Date 1484872234 -3600 # Node ID 51cf82d36a8a75a2279ce5eb10e726b949394fb6 # Parent f36a6dcc05efba04971f4ae218cf216c41b18fd6 mod_candy: Add support for enabling Candy debug mode from Prosodys config diff -r f36a6dcc05ef -r 51cf82d36a8a mod_candy/mod_candy.lua --- a/mod_candy/mod_candy.lua Fri Jan 20 01:21:21 2017 +0100 +++ b/mod_candy/mod_candy.lua Fri Jan 20 01:30:34 2017 +0100 @@ -8,6 +8,7 @@ local serve = module:depends"http_files".serve; local candy_rooms = module:get_option_array("candy_rooms"); +local candy_debug = module:get_option_boolean("candy_debug", false); local function get_autojoin() if candy_rooms then @@ -47,6 +48,7 @@ autojoin = get_autojoin(); version = prosody.version; host = module:get_host(); + debug = candy_debug; anonymous = module:get_option_string("authentication") == "anonymous"; })); end; diff -r f36a6dcc05ef -r 51cf82d36a8a mod_candy/www_files/index.html --- a/mod_candy/www_files/index.html Fri Jan 20 01:21:21 2017 +0100 +++ b/mod_candy/www_files/index.html Fri Jan 20 01:30:34 2017 +0100 @@ -16,7 +16,7 @@ Candy.init(Prosody.connect_path, { core: { // only set this to true if developing / debugging errors - debug: false, + debug: Prosody.debug, // autojoin is a *required* parameter if you don't have a plugin (e.g. roomPanel) for it // true // -> fetch info from server (NOTE: does only work with openfire server)