Diff

mod_firewall/conditions.lib.lua @ 2554:19bb4606013f

mod_firewall: Fix everything wrong with SENT_DIRECTED_PRESENCE_TO_SENDER
author Matthew Wild <mwild1@gmail.com>
date Thu, 23 Feb 2017 14:11:31 +0000
parent 2553:7ed2a66bfabd
child 2555:a9eb4d5566f3
line wrap: on
line diff
--- a/mod_firewall/conditions.lib.lua	Thu Feb 23 14:06:48 2017 +0000
+++ b/mod_firewall/conditions.lib.lua	Thu Feb 23 14:11:31 2017 +0000
@@ -263,10 +263,8 @@
 	return ("not not session.firewall_marked_"..idsafe(name));
 end
 
-function condition_handlers.SENT_DIRECTED_PRESENCE_TO_SENDER(jid)
-	local meta_deps = {};
-	jid = meta(("%q"):format(jid), meta_deps);
-	return "not not session.directed[jid]", meta_deps;
+function condition_handlers.SENT_DIRECTED_PRESENCE_TO_SENDER()
+	return "not not session.directed[from]", { "from" };
 end
 
 -- CHECK LIST: spammers contains $<@from>