mod_muc: Use enum option method for 'muc_room_default_presence_broadcast'
authorKim Alvefur <zash@zash.se>
Tue, 18 Jul 2023 12:32:41 +0200
changeset 13230 ac44bb7b7064
parent 13229 6375f0741f90
child 13231 58083329903d
mod_muc: Use enum option method for 'muc_room_default_presence_broadcast'
plugins/muc/mod_muc.lua
--- a/plugins/muc/mod_muc.lua	Tue Jul 18 12:32:05 2023 +0200
+++ b/plugins/muc/mod_muc.lua	Tue Jul 18 12:32:41 2023 +0200
@@ -290,7 +290,8 @@
 	room:set_changesubject(module:get_option_boolean("muc_room_default_change_subject", room:get_changesubject()));
 	room:set_historylength(module:get_option_integer("muc_room_default_history_length", room:get_historylength(), 0));
 	room:set_language(lang or module:get_option_string("muc_room_default_language"));
-	room:set_presence_broadcast(module:get_option("muc_room_default_presence_broadcast", room:get_presence_broadcast()));
+	room:set_presence_broadcast(module:get_option_enum("muc_room_default_presence_broadcast", room:get_presence_broadcast(), "visitor", "participant",
+		"moderator"));
 end
 
 function create_room(room_jid, config)