# HG changeset patch # User JC Brand # Date 1561019868 -7200 # Node ID da2d58208574e065dc084a78e9e595e25702c89c # Parent 21f870e1ba55f4c2db1c3abee6e8402c5c4d8cad mod_muc_defaults: Allow setting of `name` and `description Also fix setting of language diff -r 21f870e1ba55 -r da2d58208574 mod_muc_defaults/README.markdown --- a/mod_muc_defaults/README.markdown Sun Jun 16 02:00:34 2019 +0200 +++ b/mod_muc_defaults/README.markdown Thu Jun 20 10:37:48 2019 +0200 @@ -21,10 +21,12 @@ visitors = { "visitor@example.org" } }, config = { + name = "General Chat", + description = "Public chatroom with no particular topic", allow_member_invites = false, change_subject = false, history_length = 40, - language = "en", + lang = "en", logging = true, members_only = false, moderated = false, diff -r 21f870e1ba55 -r da2d58208574 mod_muc_defaults/mod_muc_defaults.lua --- a/mod_muc_defaults/mod_muc_defaults.lua Sun Jun 16 02:00:34 2019 +0200 +++ b/mod_muc_defaults/mod_muc_defaults.lua Thu Jun 20 10:37:48 2019 +0200 @@ -15,6 +15,12 @@ local function configure_room(room, config) local should_save = false; + if config.name ~= nil then + should_save = room:set_name(config.name) or should_save; + end + if config.description ~= nil then + should_save = room:set_description(config.description) or should_save; + end if config.allow_member_invites ~= nil then should_save = room:set_allow_member_invites(config.allow_member_invites) @@ -31,7 +37,7 @@ or should_save; end if config.lang ~= nil then - should_save = room:set_language(config.language) or should_save; + should_save = room:set_language(config.lang) or should_save; end if config.members_only ~= nil then should_save =