aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-06-25 15:17:37 +0200
committerKim Alvefur <zash@zash.se>2021-06-25 15:17:37 +0200
commit4c922a6d16a705a940302ab66d51d4ce04861bee (patch)
treed3816b5be48642064cb317fed769e09a3f34aa0d
parenteded7e2738b2820a406b12f0828101505cfc7c7d (diff)
downloadprosody-4c922a6d16a705a940302ab66d51d4ce04861bee.tar.gz
prosody-4c922a6d16a705a940302ab66d51d4ce04861bee.zip
core.stanza_router: Rename variable to be more specific
-rw-r--r--core/stanza_router.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 774c077e..b54ea1ab 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -194,14 +194,14 @@ function core_post_stanza(origin, stanza, preevents)
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 @@ function core_route_stanza(origin, stanza)
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");