From 1d955bd1f310d0d5ce3cfcf1906771dfd8bec96d Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 21 Jul 2023 22:49:01 +0200 Subject: 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? --- plugins/muc/mod_muc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua index 4e55e5f8..84cdd901 100644 --- a/plugins/muc/mod_muc.lua +++ b/plugins/muc/mod_muc.lua @@ -412,7 +412,7 @@ if module:get_option_boolean("muc_tombstones", true) then 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; -- cgit v1.2.3