Comparison

util/xmppstream.lua @ 6084:3c02a9ed399e

util.xmppstream: Check for callback that may add stream header attributes
author Kim Alvefur <zash@zash.se>
date Fri, 18 Apr 2014 07:50:44 +0200
parent 6063:e626ee2fe106
child 6355:c2d144d3f8dd
comparison
equal deleted inserted replaced
6082:d0e824a21861 6084:3c02a9ed399e
250 xmlns = stream_callbacks.default_ns, 250 xmlns = stream_callbacks.default_ns,
251 version = session.version and (session.version > 0 and "1.0" or nil), 251 version = session.version and (session.version > 0 and "1.0" or nil),
252 id = session.streamid or "", 252 id = session.streamid or "",
253 from = from or session.host, to = to, 253 from = from or session.host, to = to,
254 }; 254 };
255 if session.stream_attrs then
256 session:stream_attrs(from, to, attr)
257 end
255 send("<?xml version='1.0'?>"); 258 send("<?xml version='1.0'?>");
256 send(st.stanza("stream:stream", attr):top_tag()); 259 send(st.stanza("stream:stream", attr):top_tag());
257 return true; 260 return true;
258 end 261 end
259 262