# HG changeset patch # User Matthew Wild # Date 1487583168 0 # Node ID 3fe4ca2b55c262bc03853f96e3ac276049946881 # Parent 44a71584521dace7ecca5ae95d6564d569b62bed mod_firewall: Add 'SENT DIRECTED PRESENCE TO SENDER?' diff -r 44a71584521d -r 3fe4ca2b55c2 mod_firewall/conditions.lib.lua --- a/mod_firewall/conditions.lib.lua Mon Feb 20 09:31:30 2017 +0000 +++ b/mod_firewall/conditions.lib.lua Mon Feb 20 09:32:48 2017 +0000 @@ -252,6 +252,12 @@ 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; +end + -- CHECK LIST: spammers contains $<@from> function condition_handlers.CHECK_LIST(list_condition) local list_name, expr = list_condition:match("(%S+) contains (.+)$");