# HG changeset patch # User Tobias Markmann # Date 1364471359 -3600 # Node ID 57c4964eff0bd0d761888d04c282d2516de5d934 # Parent 613959dbd0b2a270faef1d29540758889add5b3d mod_privacy: Drop stanzas of type groupchat, so users aren't kicked from their chatrooms when blocking specific MUC occupants. diff -r 613959dbd0b2 -r 57c4964eff0b plugins/mod_privacy.lua --- a/plugins/mod_privacy.lua Wed Mar 27 23:48:39 2013 +0100 +++ b/plugins/mod_privacy.lua Thu Mar 28 12:49:19 2013 +0100 @@ -366,6 +366,10 @@ 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"));