Diff

plugins/muc/mod_muc.lua @ 13226:ac44bb7b7064

mod_muc: Use enum option method for 'muc_room_default_presence_broadcast'
author Kim Alvefur <zash@zash.se>
date Tue, 18 Jul 2023 12:32:41 +0200
parent 13213:50324f66ca2a
child 13229:bb7177efbf41
line wrap: on
line diff
--- 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)