mod_s2s: Do not include xmlns:db declaration in stream header if mod_dialback is not loaded
authorMatthew Wild <mwild1@gmail.com>
Tue, 12 Mar 2013 12:30:08 +0000
changeset 5345 9b85976c873f
parent 5344 d45316798b71
child 5346 b8fbb9d07efc
child 5347 32e25358c3c2
mod_s2s: Do not include xmlns:db declaration in stream header if mod_dialback is not loaded
plugins/mod_s2s/mod_s2s.lua
--- 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");