# HG changeset patch # User Kim Alvefur # Date 1390075473 -3600 # Node ID 50c4272957674a15f69a3013857d3e13b9be79c8 # Parent 4b15437d6c56caa25076bc52a651fb2370e5b270 mod_mam_muc: Make the logging option in the room config reflect logging and inherit the default diff -r 4b15437d6c56 -r 50c427295767 mod_mam_muc/mod_mam_muc.lua --- a/mod_mam_muc/mod_mam_muc.lua Wed Jan 15 14:45:37 2014 +0100 +++ b/mod_mam_muc/mod_mam_muc.lua Sat Jan 18 21:04:33 2014 +0100 @@ -33,12 +33,16 @@ module:hook("muc-config-form", function(event) local room, form = event.room, event.form; + local logging_enabled = room._data.logging; + if logging_enabled == nil then + logging_enabled = log_by_default; + end table.insert(form, { name = muc_form_config_option, type = "boolean", label = "Enable Logging?", - value = room._data.logging or false, + value = logging_enabled, } ); end);