From 5a9c02408468273025dc80c2dc0df43be13cd679 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 29 Jan 2010 02:49:34 +0000 Subject: mod_privacy: ...and no 'to' for presence implies an outgoing broadcast --- plugins/mod_privacy.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_privacy.lua b/plugins/mod_privacy.lua index 66ac9f02..9640cafc 100644 --- a/plugins/mod_privacy.lua +++ b/plugins/mod_privacy.lua @@ -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; -- cgit v1.2.3