mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 13:47:41 +03:00
core.stanza_router: Rename variable to be more specific
This commit is contained in:
parent
eded7e2738
commit
4c922a6d16
1 changed files with 3 additions and 3 deletions
|
@ -194,14 +194,14 @@ function core_post_stanza(origin, stanza, preevents)
|
||||||
end
|
end
|
||||||
|
|
||||||
function core_route_stanza(origin, stanza)
|
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);
|
local from_host = jid_host(stanza.attr.from);
|
||||||
|
|
||||||
-- Auto-detect origin if not specified
|
-- Auto-detect origin if not specified
|
||||||
origin = origin or hosts[from_host];
|
origin = origin or hosts[from_host];
|
||||||
if not origin then return false; end
|
if not origin then return false; end
|
||||||
|
|
||||||
if hosts[host] then
|
if hosts[to_host] then
|
||||||
-- old stanza routing code removed
|
-- old stanza routing code removed
|
||||||
core_post_stanza(origin, stanza);
|
core_post_stanza(origin, stanza);
|
||||||
else
|
else
|
||||||
|
@ -212,7 +212,7 @@ function core_route_stanza(origin, stanza)
|
||||||
local xmlns = stanza.attr.xmlns;
|
local xmlns = stanza.attr.xmlns;
|
||||||
stanza.attr.xmlns = nil;
|
stanza.attr.xmlns = nil;
|
||||||
local routed = host_session.events.fire_event("route/remote", {
|
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
|
stanza.attr.xmlns = xmlns; -- reset
|
||||||
if not routed then
|
if not routed then
|
||||||
log("debug", "Could not route stanza to remote");
|
log("debug", "Could not route stanza to remote");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue