changeset 2857:ff1666716d10

mod_firewall: Make SUBSCRIBED match for stanzas sent to self (fixes #1052)
author Kim Alvefur <zash@zash.se>
date Sat, 30 Dec 2017 23:53:41 +0100
parents 08f6b9d37a49
children 150a7bd59043
files mod_firewall/conditions.lib.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_firewall/conditions.lib.lua	Fri Dec 29 16:28:47 2017 +0100
+++ b/mod_firewall/conditions.lib.lua	Sat Dec 30 23:53:41 2017 +0100
@@ -116,8 +116,8 @@
 end
 
 function condition_handlers.SUBSCRIBED()
-	return "(to_node and rostermanager.is_contact_subscribed(to_node, to_host, bare_from))",
-	       { "rostermanager", "split_to", "bare_from" };
+	return "(bare_to == bare_from or to_node and rostermanager.is_contact_subscribed(to_node, to_host, bare_from))",
+	       { "rostermanager", "split_to", "bare_to", "bare_from" };
 end
 
 function condition_handlers.PAYLOAD(payload_ns)