Changeset

5345:9b85976c873f

mod_s2s: Do not include xmlns:db declaration in stream header if mod_dialback is not loaded
author Matthew Wild <mwild1@gmail.com>
date Tue, 12 Mar 2013 12:30:08 +0000
parents 5344:d45316798b71
children 5346:b8fbb9d07efc 5347:32e25358c3c2
files plugins/mod_s2s/mod_s2s.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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");