diff mod_muc_defaults/mod_muc_defaults.lua @ 3623:da2d58208574

mod_muc_defaults: Allow setting of `name` and `description Also fix setting of language
author JC Brand <jc@opkode.com>
date Thu, 20 Jun 2019 10:37:48 +0200
parents 796b29911747
children d1bc50890343
line wrap: on
line diff
--- 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 =