Changeset

2412:9159f9166893

mod_firewall: Use the sender bare JID instead of 'to' for stanzas to self
author Kim Alvefur <zash@zash.se>
date Sat, 03 Dec 2016 20:00:08 +0100
parents 2411:e327b06b9a1b
children 2413:b64c0150d663
files mod_firewall/mod_firewall.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua	Sat Dec 03 15:28:22 2016 +0100
+++ b/mod_firewall/mod_firewall.lua	Sat Dec 03 20:00:08 2016 +0100
@@ -90,7 +90,7 @@
 	jid_bare = {
 		global_code = [[local jid_bare = require "util.jid".bare;]];
 	};
-	to = { local_code = [[local to = stanza.attr.to;]] };
+	to = { local_code = [[local to = stanza.attr.to or jid_bare(session.full_jid);]]; depends = { "jid_bare" } };
 	from = { local_code = [[local from = stanza.attr.from;]] };
 	type = { local_code = [[local type = stanza.attr.type;]] };
 	name = { local_code = [[local name = stanza.name]] };