aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/s2smanager.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index 5907ff2f..8d590843 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -117,10 +117,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