aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s/mod_s2s.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-03-12 12:30:08 +0000
committerMatthew Wild <mwild1@gmail.com>2013-03-12 12:30:08 +0000
commitb1e980e67b54a71dda661ec91e351cd5b60ce78b (patch)
treea0829020f2182f7665fd6469ee39dfccecbb6cbf /plugins/mod_s2s/mod_s2s.lua
parent5f13122f42087d5f052e0a9be03610c8a1fbd191 (diff)
downloadprosody-b1e980e67b54a71dda661ec91e351cd5b60ce78b.tar.gz
prosody-b1e980e67b54a71dda661ec91e351cd5b60ce78b.zip
mod_s2s: Do not include xmlns:db declaration in stream header if mod_dialback is not loaded
Diffstat (limited to 'plugins/mod_s2s/mod_s2s.lua')
-rw-r--r--plugins/mod_s2s/mod_s2s.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index 74014457..6d4900fa 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -249,7 +249,8 @@ function stream_callbacks.streamopened(session, attr)
if session.secure and not session.cert_chain_status then check_cert_status(session); end
send("<?xml version='1.0'?>");
- send(st.stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback',
+ send(st.stanza("stream:stream", { xmlns='jabber:server',
+ ["xmlns:db"]= hosts[to].modules.dialback and 'jabber:server:dialback' or nil,
["xmlns:stream"]='http://etherx.jabber.org/streams', id=session.streamid, from=to, to=from, version=(session.version > 0 and "1.0" or nil) }):top_tag());
if session.version >= 1.0 then
local features = st.stanza("stream:features");