Changeset

13233:37d67b5f9768

mod_muc: Use enum config API for 'restrict_room_creation' This communicates the accepted values in case the config diverges from them. Note that older documentation used an "admin" value behaving like an alias to true, but this is no longer handled. Should it?
author Kim Alvefur <zash@zash.se>
date Fri, 21 Jul 2023 22:49:01 +0200
parents 13232:e0ab20519ce5
children 13234:c886ea087b38
files plugins/muc/mod_muc.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua	Fri Jul 21 22:48:54 2023 +0200
+++ b/plugins/muc/mod_muc.lua	Fri Jul 21 22:49:01 2023 +0200
@@ -412,7 +412,7 @@
 	end, -10);
 end
 
-local restrict_room_creation = module:get_option("restrict_room_creation");
+local restrict_room_creation = module:get_option_enum("restrict_room_creation", false, true, "local");
 module:default_permission(restrict_room_creation == true and "prosody:admin" or "prosody:registered", ":create-room");
 module:hook("muc-room-pre-create", function(event)
 	local origin, stanza = event.origin, event.stanza;