equal
deleted
inserted
replaced
31 local archive = module:open_store("archive2", "archive"); |
31 local archive = module:open_store("archive2", "archive"); |
32 local rooms = hosts[module.host].modules.muc.rooms; |
32 local rooms = hosts[module.host].modules.muc.rooms; |
33 |
33 |
34 module:hook("muc-config-form", function(event) |
34 module:hook("muc-config-form", function(event) |
35 local room, form = event.room, event.form; |
35 local room, form = event.room, event.form; |
|
36 local logging_enabled = room._data.logging; |
|
37 if logging_enabled == nil then |
|
38 logging_enabled = log_by_default; |
|
39 end |
36 table.insert(form, |
40 table.insert(form, |
37 { |
41 { |
38 name = muc_form_config_option, |
42 name = muc_form_config_option, |
39 type = "boolean", |
43 type = "boolean", |
40 label = "Enable Logging?", |
44 label = "Enable Logging?", |
41 value = room._data.logging or false, |
45 value = logging_enabled, |
42 } |
46 } |
43 ); |
47 ); |
44 end); |
48 end); |
45 |
49 |
46 module:hook("muc-config-submitted", function(event) |
50 module:hook("muc-config-submitted", function(event) |