mod_s2s: Do not include xmlns:db declaration in stream header if mod_dialback is not loaded
--- a/plugins/mod_s2s/mod_s2s.lua Mon Mar 11 21:39:15 2013 +0100
+++ b/plugins/mod_s2s/mod_s2s.lua Tue Mar 12 12:30:08 2013 +0000
@@ -249,7 +249,8 @@
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");