# HG changeset patch # User Kim Alvefur # Date 1398205426 -7200 # Node ID 5b59798c979af85c1e9b70e95a77b6d6d1e6520e # Parent 69bc9dfcbd89cb591efe631db3560d8ad162c6ba# Parent 2ae6e9063e88870b713e1ceaa7408ce5163596e7 Merge 0.10->trunk diff -r 69bc9dfcbd89 -r 5b59798c979a plugins/mod_s2s/mod_s2s.lua --- a/plugins/mod_s2s/mod_s2s.lua Mon Apr 21 17:42:44 2014 +0100 +++ b/plugins/mod_s2s/mod_s2s.lua Wed Apr 23 00:23:46 2014 +0200 @@ -150,6 +150,13 @@ module:hook("route/remote", route_to_new_session, -10); module:hook("s2s-authenticated", make_authenticated, -1); module:hook("s2s-read-timeout", keepalive, -1); + module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza) + if session.type == "s2sout" then + -- Stream is authenticated and we are seem to be done with feature negotiation, + -- so the stream is ready for stanzas. RFC 6120 Section 4.3 + mark_connected(session); + end + end, -1); end -- Stream is authorised, and ready for normal stanzas @@ -219,7 +226,10 @@ end session.log("debug", "connection %s->%s is now authenticated for %s", session.from_host, session.to_host, host); - mark_connected(session); + if (session.type == "s2sout" and session.external_auth ~= "succeeded") or session.type == "s2sin" then + -- Stream either used dialback for authentication or is an incoming stream. + mark_connected(session); + end return true; end diff -r 69bc9dfcbd89 -r 5b59798c979a tools/jabberd14sql2prosody.lua --- a/tools/jabberd14sql2prosody.lua Mon Apr 21 17:42:44 2014 +0100 +++ b/tools/jabberd14sql2prosody.lua Wed Apr 23 00:23:46 2014 +0200 @@ -428,7 +428,7 @@ end -- import modules -package.path = package.path.."..\?.lua;"; +package.path = package.path..";../?.lua;"; local my_name = arg[0]; if my_name:match("[/\\]") then diff -r 69bc9dfcbd89 -r 5b59798c979a util/dataforms.lua --- a/util/dataforms.lua Mon Apr 21 17:42:44 2014 +0100 +++ b/util/dataforms.lua Wed Apr 23 00:23:46 2014 +0200 @@ -94,6 +94,15 @@ end end + local media = field.media; + if media then + form:tag("media", { xmlns = "urn:xmpp:media-element", height = media.height, width = media.width }); + for _, val in ipairs(media) do + form:tag("uri", { type = val.type }):text(val.uri):up() + end + form:up(); + end + if field.required then form:tag("required"):up(); end