# HG changeset patch # User Matthew Wild # Date 1638793447 0 # Node ID 181738ae4117666fb4dd000dc0994b9851568f0e # Parent 9e9ec0f0b128b62afedcdc6452cf11354abde1d5 mod_muc_rtbl: Skip check if user has any explicit affiliation with the MUC diff -r 9e9ec0f0b128 -r 181738ae4117 mod_muc_rtbl/mod_muc_rtbl.lua --- a/mod_muc_rtbl/mod_muc_rtbl.lua Mon Dec 06 12:02:45 2021 +0000 +++ b/mod_muc_rtbl/mod_muc_rtbl.lua Mon Dec 06 12:24:07 2021 +0000 @@ -93,6 +93,13 @@ module:hook("muc-occupant-pre-join", function (event) local from_bare = jid.bare(event.stanza.attr.from); + + local affiliation = event.room:get_affiliation(from_bare); + if affiliation and affilition ~= "none" then + -- Skip check for affiliated users + return; + end + local hash = sha256(jid.bare(event.stanza.attr.from), true); if banned_hashes[hash] then module:log("info", "Blocked user <%s> from room <%s> due to RTBL match", from_bare, event.stanza.attr.to);