diff options
author | Kim Alvefur <zash@zash.se> | 2023-07-21 22:49:01 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-07-21 22:49:01 +0200 |
commit | 1d955bd1f310d0d5ce3cfcf1906771dfd8bec96d (patch) | |
tree | 3241c24c737abf9f81f62a690344fee86d386a27 /plugins/muc | |
parent | 69e11f7524978f94486cca187fea67f34c8376b5 (diff) | |
download | prosody-1d955bd1f310d0d5ce3cfcf1906771dfd8bec96d.tar.gz prosody-1d955bd1f310d0d5ce3cfcf1906771dfd8bec96d.zip |
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?
Diffstat (limited to 'plugins/muc')
-rw-r--r-- | plugins/muc/mod_muc.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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; |