aboutsummaryrefslogtreecommitdiffstats
path: root/core/s2smanager.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/s2smanager.lua')
-rw-r--r--core/s2smanager.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index ea626baa..9e0a91d1 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -92,10 +92,15 @@ function mark_connected(session)
local event_data = { session = session };
if session.type == "s2sout" then
prosody.events.fire_event("s2sout-established", event_data);
- hosts[session.from_host].events.fire_event("s2sout-established", event_data);
+ hosts[from].events.fire_event("s2sout-established", event_data);
else
+ local host_session = hosts[to];
+ session.send = function(stanza)
+ host_session.events.fire_event("route/remote", { from_host = to, to_host = from, stanza = stanza });
+ end;
+
prosody.events.fire_event("s2sin-established", event_data);
- hosts[session.to_host].events.fire_event("s2sin-established", event_data);
+ hosts[to].events.fire_event("s2sin-established", event_data);
end
if session.direction == "outgoing" then