mod_dialback: Move d-w-d after to/from validation
[prosody.git] / plugins / mod_component.lua
index 1497b12fc6a0096661aae5e1345cab9f25c4be52..297609d830d1a55ffab5c797477cef2c9e83fd19 100644 (file)
@@ -177,9 +177,7 @@ function stream_callbacks.streamopened(session, attr)
        session.streamid = uuid_gen();
        session.notopen = nil;
        -- Return stream header
-       session.send("<?xml version='1.0'?>");
-       session.send(st.stanza("stream:stream", { xmlns=xmlns_component,
-                       ["xmlns:stream"]='http://etherx.jabber.org/streams', id=session.streamid, from=session.host }):top_tag());
+       session:open_stream();
 end
 
 function stream_callbacks.streamclosed(session)