Improve UX by providing defaults users expect
authorSeve Ferrer <seve@delape.net>
Fri, 18 Dec 2020 15:28:12 +0100
changeset 4307 d261233f7ced
parent 4306 c9e1eee6a948
child 4308 aec8148df26a
Improve UX by providing defaults users expect
mod_muc_http_auth/README.md
mod_muc_http_auth/mod_muc_http_auth.lua
--- a/mod_muc_http_auth/README.md	Tue Dec 15 23:40:18 2020 +0000
+++ b/mod_muc_http_auth/README.md	Fri Dec 18 15:28:12 2020 +0100
@@ -52,7 +52,7 @@
 -- muc_http_auth_enabled_for = {"teaparty"}
 -- muc_http_auth_disabled_for = {"teaparty"}
 ```
-If none or both are found, all rooms in the MUC component will have this module enabled.
+If none is set, all rooms in the MUC component will have this module enabled.
 
 Note: Use the node part of the MUC jid for these lists. Example:  
 
--- a/mod_muc_http_auth/mod_muc_http_auth.lua	Tue Dec 15 23:40:18 2020 +0000
+++ b/mod_muc_http_auth/mod_muc_http_auth.lua	Fri Dec 18 15:28:12 2020 +0100
@@ -12,9 +12,8 @@
 local authorize_registration = module:get_option("muc_http_auth_authorize_registration", false)
 
 local function must_be_authorized(room_node)
-	-- If none or both of these are set, all rooms need authorization
+	-- If none of these is set, all rooms need authorization
 	if not enabled_for and not disabled_for then return true; end
-	if enabled_for and disabled_for then return true; end
 
 	if enabled_for then return enabled_for:contains(room_node); end
 	if disabled_for then return not disabled_for:contains(room_node); end