From afbece2a947a2583a60daf6ec70259992c357e69 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