Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
13225:6375f0741f90 | 13226:ac44bb7b7064 |
---|---|
288 room:set_whois(module:get_option_boolean("muc_room_default_public_jids", | 288 room:set_whois(module:get_option_boolean("muc_room_default_public_jids", |
289 room:get_whois() == "anyone") and "anyone" or "moderators"); | 289 room:get_whois() == "anyone") and "anyone" or "moderators"); |
290 room:set_changesubject(module:get_option_boolean("muc_room_default_change_subject", room:get_changesubject())); | 290 room:set_changesubject(module:get_option_boolean("muc_room_default_change_subject", room:get_changesubject())); |
291 room:set_historylength(module:get_option_integer("muc_room_default_history_length", room:get_historylength(), 0)); | 291 room:set_historylength(module:get_option_integer("muc_room_default_history_length", room:get_historylength(), 0)); |
292 room:set_language(lang or module:get_option_string("muc_room_default_language")); | 292 room:set_language(lang or module:get_option_string("muc_room_default_language")); |
293 room:set_presence_broadcast(module:get_option("muc_room_default_presence_broadcast", room:get_presence_broadcast())); | 293 room:set_presence_broadcast(module:get_option_enum("muc_room_default_presence_broadcast", room:get_presence_broadcast(), "visitor", "participant", |
294 "moderator")); | |
294 end | 295 end |
295 | 296 |
296 function create_room(room_jid, config) | 297 function create_room(room_jid, config) |
297 if jid_bare(room_jid) ~= room_jid or not jid_prep(room_jid, true) then | 298 if jid_bare(room_jid) ~= room_jid or not jid_prep(room_jid, true) then |
298 return nil, "invalid-jid"; | 299 return nil, "invalid-jid"; |