Mercurial > prosody-modules
changeset 6518:b66c93276534
mod_muc_restrict_attention: Fix missing global
| author | Menel <menel@snikket.de> |
|---|---|
| date | Thu, 16 Apr 2026 12:19:48 +0200 |
| parents | 3d14a407307d |
| children | 01d8bfbfc435 |
| files | mod_muc_restrict_attention/mod_muc_restrict_attention.lua |
| diffstat | 1 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_muc_restrict_attention/mod_muc_restrict_attention.lua Thu Apr 16 12:02:18 2026 +0200 +++ b/mod_muc_restrict_attention/mod_muc_restrict_attention.lua Thu Apr 16 12:19:48 2026 +0200 @@ -3,20 +3,22 @@ local from_affiliation local from_jid local room_jid +local restrict_members_by_default = true +local restrict_participants_by_default = true local loglevel = module:get_option_enum("muc_restrict_attention_loglevel", "debug", "info", "warn", "error") local restrict_by_default = module:get_option_enum("muc_restrict_attention_by_default", "members", "participants", false, "false") -- ugly hack, improve it when you do for the room config option too if restrict_by_default == "members" then - local restrict_members_by_default = true - local restrict_participants_by_default = true + restrict_members_by_default = true + restrict_participants_by_default = true elseif restrict_by_default == false - or restrict_by_default == "false" then - local restrict_members_by_default = false - local restrict_participants_by_default = false +or restrict_by_default == "false" then + restrict_members_by_default = false + restrict_participants_by_default = false elseif restrict_by_default == "participants" then - local restrict_members_by_default = false - local restrict_participants_by_default = true + restrict_members_by_default = false + restrict_participants_by_default = true end local function should_restrict_members(room)
