Mercurial > prosody-modules
changeset 2916:b1cdcbcd1c90
mod_firewall: Add PENDING SUBSCRIPTION FROM SENDER? condition
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 09 Mar 2018 13:35:44 +0000 (2018-03-09) |
parents | b8f2e86df7ce |
children | cd5e6534b813 |
files | mod_firewall/conditions.lib.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_firewall/conditions.lib.lua Fri Mar 09 13:35:11 2018 +0000 +++ b/mod_firewall/conditions.lib.lua Fri Mar 09 13:35:44 2018 +0000 @@ -120,6 +120,11 @@ { "rostermanager", "split_to", "bare_to", "bare_from" }; end +function condition_handlers.PENDING_SUBSCRIPTION_FROM_SENDER() + return "(bare_to == bare_from or to_node and rostermanager.is_contact_pending_in(to_node, to_host, bare_from))", + { "rostermanager", "split_to", "bare_to", "bare_from" }; +end + function condition_handlers.PAYLOAD(payload_ns) return ("stanza:get_child(nil, %q)"):format(payload_ns); end