projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50538e5
)
mod_privacy: Drop stanzas of type groupchat, so users aren't kicked from their chatro...
author
Tobias Markmann
<tm@ayena.de>
Thu, 28 Mar 2013 11:49:19 +0000
(12:49 +0100)
committer
Tobias Markmann
<tm@ayena.de>
Thu, 28 Mar 2013 11:49:19 +0000
(12:49 +0100)
plugins/mod_privacy.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_privacy.lua
b/plugins/mod_privacy.lua
index 7ec94922ad562170f1f118393f3524a5e15f9c66..dc6b153a46caff8cd41916ce84a26020d2f42653 100644
(file)
--- 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"));