Mercurial > prosody-modules
diff mod_muc_rtbl/mod_muc_rtbl.lua @ 5650:0eb2d5ea2428
merge
author | Stephen Paul Weber <singpolyma@singpolyma.net> |
---|---|
date | Sat, 06 May 2023 19:40:23 -0500 |
parents | f6577cdb1d91 |
children | ba71fdc8ea73 |
line wrap: on
line diff
--- a/mod_muc_rtbl/mod_muc_rtbl.lua Wed Feb 22 22:47:45 2023 -0500 +++ b/mod_muc_rtbl/mod_muc_rtbl.lua Sat May 06 19:40:23 2023 -0500 @@ -38,6 +38,13 @@ module:log("debug", "Retracted hash: %s", hash); banned_hashes[hash] = nil; end; + + purge = function() + module:log("debug", "Purge all hashes"); + for hash in pairs(banned_hashes) do + banned_hashes[hash] = nil; + end + end; }); function request_list() @@ -146,7 +153,7 @@ module:hook("muc-private-message", function(event) local occupant = event.room:get_occupant_by_nick(event.stanza.attr.from); - local affiliation = event.room:get_affiliation(event.occupant.bare_jid); + local affiliation = event.room:get_affiliation(occupant.bare_jid); if affiliation and affiliation ~= "none" then -- Skip check for affiliated users return;