# HG changeset patch # User Kim Alvefur # Date 1624627057 -7200 # Node ID e6e56e2dd996df1c8f4578787072fc89e29b9985 # Parent 0807e835d3b53a1ef5d625fb36f4cd1937983773 core.stanza_router: Rename variable to be more specific diff -r 0807e835d3b5 -r e6e56e2dd996 core/stanza_router.lua --- 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");