--- 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);