Changeset

11629:e6e56e2dd996

core.stanza_router: Rename variable to be more specific
author Kim Alvefur <zash@zash.se>
date Fri, 25 Jun 2021 15:17:37 +0200
parents 11628:0807e835d3b5
children 11630:855b065d5fd6
files core/stanza_router.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/core/stanza_router.lua	Mon Jun 21 22:43:26 2021 +0200
+++ b/core/stanza_router.lua	Fri Jun 25 15:17:37 2021 +0200
@@ -194,14 +194,14 @@
 end
 
 function core_route_stanza(origin, stanza)
-	local host = jid_host(stanza.attr.to);
+	local to_host = jid_host(stanza.attr.to);
 	local from_host = jid_host(stanza.attr.from);
 
 	-- Auto-detect origin if not specified
 	origin = origin or hosts[from_host];
 	if not origin then return false; end
 
-	if hosts[host] then
+	if hosts[to_host] then
 		-- old stanza routing code removed
 		core_post_stanza(origin, stanza);
 	else
@@ -212,7 +212,7 @@
 			local xmlns = stanza.attr.xmlns;
 			stanza.attr.xmlns = nil;
 			local routed = host_session.events.fire_event("route/remote", {
-				origin = origin, stanza = stanza, from_host = from_host, to_host = host });
+				origin = origin, stanza = stanza, from_host = from_host, to_host = to_host });
 			stanza.attr.xmlns = xmlns; -- reset
 			if not routed then
 				log("debug", "Could not route stanza to remote");