diff options
author | Kim Alvefur <zash@zash.se> | 2012-02-23 23:04:59 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2012-02-23 23:04:59 +0100 |
commit | 7a3928f68e1bb18f483ce9c58c6f2e1d73204213 (patch) | |
tree | 97ea842b1071dea434998b3329a99755d1377893 /plugins/s2s/mod_s2s.lua | |
parent | 5ddde9afe607893a858d7249cb2fbf0b1b022f8f (diff) | |
download | prosody-7a3928f68e1bb18f483ce9c58c6f2e1d73204213.tar.gz prosody-7a3928f68e1bb18f483ce9c58c6f2e1d73204213.zip |
mod_s2s: Attach send function to session
Diffstat (limited to 'plugins/s2s/mod_s2s.lua')
-rw-r--r-- | plugins/s2s/mod_s2s.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/s2s/mod_s2s.lua b/plugins/s2s/mod_s2s.lua index bb1a6dd7..90bedce9 100644 --- a/plugins/s2s/mod_s2s.lua +++ b/plugins/s2s/mod_s2s.lua @@ -192,6 +192,9 @@ function stream_callbacks.streamopened(session, attr) if session.secure and not session.cert_chain_status then check_cert_status(session); end + function session.send(data) + return send_to_host(session.to_host, session.from_host, data); + end send("<?xml version='1.0'?>"); send(st.stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback', ["xmlns:stream"]='http://etherx.jabber.org/streams', id=session.streamid, from=session.to_host, to=session.from_host, version=(session.version > 0 and "1.0" or nil) }):top_tag()); |