diff options
-rw-r--r-- | plugins/mod_blocklist.lua | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/plugins/mod_blocklist.lua b/plugins/mod_blocklist.lua index 3a621753..99773b3a 100644 --- a/plugins/mod_blocklist.lua +++ b/plugins/mod_blocklist.lua @@ -262,7 +262,22 @@ local function drop_stanza(event) local to, from = attr.to, attr.from; to = to and jid_split(to); if to and from then - return is_blocked(to, from); + if is_blocked(to, from) then + return true; + end + + -- Check mediated MUC inviter + if stanza.name == "message" then + local invite = stanza:find("{http://jabber.org/protocol/muc#user}x/invite"); + if invite then + from = jid_prep(invite.attr.from); + if is_blocked(to, from) then + return true; + end + end + end + + return false; end end |