mod_privacy: ...and no 'to' for presence implies an outgoing broadcast
authorMatthew Wild <mwild1@gmail.com>
Fri, 29 Jan 2010 02:49:34 +0000 (02:49 +0000)
committerMatthew Wild <mwild1@gmail.com>
Fri, 29 Jan 2010 02:49:34 +0000 (02:49 +0000)
plugins/mod_privacy.lua

index 66ac9f027dbd12509182bb83474d12a82ada941e..9640cafcdc04199f094832f15d8d047630dbe0d6 100644 (file)
@@ -415,7 +415,7 @@ function checkIfNeedToBeBlocked(e, session)
                                (stanza.name == "message" and item.message) or
                                (stanza.name == "iq" and item.iq) or
                                (stanza.name == "presence" and jid_bare(stanza.attr.to) == bare_jid and item["presence-in"]) or
-                               (stanza.name == "presence" and not stanza.attr.from or jid_bare(stanza.attr.from) == bare_jid and item["presence-out"]) or
+                               (stanza.name == "presence" and not stanza.attr.from or not stanza.attr.to or jid_bare(stanza.attr.from) == bare_jid and item["presence-out"]) or
                                (item.message == false and item.iq == false and item["presence-in"] == false and item["presence-out"] == false)
                        ) then
                                apply = true;