From 11a3a158eb42284dd3585e04439f38ee3e6d548c Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Thu, 28 Mar 2013 12:49:19 +0100 Subject: mod_privacy: Drop stanzas of type groupchat, so users aren't kicked from their chatrooms when blocking specific MUC occupants. --- plugins/mod_privacy.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/mod_privacy.lua') diff --git a/plugins/mod_privacy.lua b/plugins/mod_privacy.lua index 7ec94922..dc6b153a 100644 --- a/plugins/mod_privacy.lua +++ b/plugins/mod_privacy.lua @@ -366,6 +366,10 @@ function checkIfNeedToBeBlocked(e, session) end if apply then if block then + -- drop and not bounce groupchat messages, otherwise users will get kicked + if stanza.attr.type == "groupchat" then + return true; + end module:log("debug", "stanza blocked: %s, to: %s, from: %s", tostring(stanza.name), tostring(to), tostring(from)); if stanza.name == "message" then origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); -- cgit v1.2.3