Software /
code /
prosody
Diff
plugins/s2s/mod_s2s.lua @ 4561:429a007f70e8
mod_s2s: Attach send function to session
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 23 Feb 2012 23:04:59 +0100 |
parent | 4560:edd775310112 |
child | 4573:09255a10fdfa |
line wrap: on
line diff
--- a/plugins/s2s/mod_s2s.lua Thu Feb 23 23:03:28 2012 +0100 +++ b/plugins/s2s/mod_s2s.lua Thu Feb 23 23:04:59 2012 +0100 @@ -192,6 +192,9 @@ 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());