# HG changeset patch # User Kim Alvefur # Date 1689972541 -7200 # Node ID 37d67b5f9768ccdfc32240b595c96c7e3b9b6319 # Parent e0ab20519ce545ecc949cd26f9919644e6ddd9b6 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? diff -r e0ab20519ce5 -r 37d67b5f9768 plugins/muc/mod_muc.lua --- 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;