mod_firewall: SUBSCRIBED: Only check roster if 'to' address has a nodepart (fixes traceback)
authorMatthew Wild <mwild1@gmail.com>
Fri, 24 Feb 2017 09:51:43 +0000
changeset 2568 240985f7d1f7
parent 2567 2f1e25706f81
child 2569 fc53165d8afe
mod_firewall: SUBSCRIBED: Only check roster if 'to' address has a nodepart (fixes traceback)
mod_firewall/conditions.lib.lua
--- a/mod_firewall/conditions.lib.lua	Fri Feb 24 09:50:49 2017 +0000
+++ b/mod_firewall/conditions.lib.lua	Fri Feb 24 09:51:43 2017 +0000
@@ -114,7 +114,7 @@
 end
 
 function condition_handlers.SUBSCRIBED()
-	return "rostermanager.is_contact_subscribed(to_node, to_host, bare_from)",
+	return "(to_node and rostermanager.is_contact_subscribed(to_node, to_host, bare_from))",
 	       { "rostermanager", "split_to", "bare_from" };
 end